arktype
arktype copied to clipboard
Support `this` in `2.0` release candidate
Currently, the this
keyword works at a type-level, but fails at runtime.
This needs to be addressed, and the tests in this.test.ts
reenabled, e.g.:
const disappointingGift = type({
label: "string",
"box?": "this",
});
type ExpectedDisappointingGift = {
label: string;
box?: ExpectedDisappointingGift;
};
attest<ExpectedDisappointingGift>(disappointingGift.infer);