-
Notifications
You must be signed in to change notification settings - Fork 2
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
Shorter Implementation of Nominal #1
Comments
Copying over the response from reddit https://www.reddit.com/r/typescript/comments/w5rebv/comment/ihbgoy3/?utm_source=share&utm_medium=web2x&context=3 We actually have a bug here, will try to patch later tonight The reason we did the class thing was to try to get this to work
To be clear, this is not actually working in our code rn. We screwed it up somewhere along the way But the idea of using the function is A basic example of the desired behaviours is here Actually not super sure how to make an ergonomic way to achieve this off the top of my head, happy to brainstorm |
@CryogenicPlanet any progress 😉? |
@mochaaP Unfortunately not, don't have a great way in mind to do this without making the UX of the tool much worse. And haven't had the time to spend too much time thinking about it |
- Breaking Change: Remove nominal and nominal.make - Use simpler implementation from #1 credit to @MananTank as this solves the "error TS2527: The inferred type of 'nominal' references an inaccessible 'unique symbol' type. A type annotation is necessary."
Works with all the examples mentioned in readme.md
check it out :
https://codesandbox.io/s/nominal-types-l8k9ti?file=/src/nominal.ts
The text was updated successfully, but these errors were encountered: