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

[Question]What's the different between this project and ts-opaque ? #3

Open
yw662 opened this issue Dec 6, 2022 · 1 comment
Open

Comments

@yw662
Copy link

yw662 commented Dec 6, 2022

This project seems to be a simplified version of that one, from what I read you seem to be using similar approaches to make the magic happen. I haven't read the entire code so I am probably wrong.
But anyway can the nominal type be used as a better/newer/shorter/lighter alternative to opaque type, since they are conceptually similar ?

@CryogenicPlanet
Copy link
Member

Haven't played with ts-opaque much myself so not sure if they really interop, but just quickly looking at it I think nominal can do everything it does.

We have been adding some stuff from how we internally use nominal to it's "standard library" like https://github.com/modfy/nominal/blob/master/examples/proportionalityConstant.ts or things like keys, plus, minus here https://github.com/modfy/nominal/blob/master/src/standardLib.ts

Basically nominal is just something we use extensively internally and open sourced, so kinda add to it depending on what we see we need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants