Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support this in 2.0 release candidate #1081

Closed
ssalbdivad opened this issue Aug 6, 2024 · 0 comments
Closed

Support this in 2.0 release candidate #1081

ssalbdivad opened this issue Aug 6, 2024 · 0 comments

Comments

@ssalbdivad
Copy link
Member

ssalbdivad commented Aug 6, 2024

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);

There are several places in the repo where this is referenced, mostly to reenable tests. Search for this issue's url and remove those references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done (merged or closed)
Development

No branches or pull requests

1 participant