We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Can I suggest also: type oddNumber = twoMilOdd | fourMilOdd | ... etc. Where: type twoMilOdd = 1 | 3 | 5 | ... etc. So isOdd can be a type guard:
type oddNumber = twoMilOdd | fourMilOdd | ... etc.
type twoMilOdd = 1 | 3 | 5 | ... etc.
function isOdd(value: number): value is oddNumber { ... }
The text was updated successfully, but these errors were encountered:
This is what this project has needed all along!
Sorry, something went wrong.
Also no factories or adapters.
Nice! we can get compile-time checks!
No branches or pull requests
Can I suggest also:
type oddNumber = twoMilOdd | fourMilOdd | ... etc.
Where:
type twoMilOdd = 1 | 3 | 5 | ... etc.
So isOdd can be a type guard:
The text was updated successfully, but these errors were encountered: