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

No Typescript definitions #22

Open
dcollien opened this issue Oct 26, 2021 · 3 comments
Open

No Typescript definitions #22

dcollien opened this issue Oct 26, 2021 · 3 comments

Comments

@dcollien
Copy link

Can I suggest also:
type oddNumber = twoMilOdd | fourMilOdd | ... etc.
Where:
type twoMilOdd = 1 | 3 | 5 | ... etc.
So isOdd can be a type guard:

function isOdd(value: number): value is oddNumber { ... }
@i-am-gizm0
Copy link

This is what this project has needed all along!

@dogweather
Copy link

Also no factories or adapters.

@Rudxain
Copy link

Rudxain commented Apr 6, 2024

Nice! we can get compile-time checks!

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

4 participants