-
Notifications
You must be signed in to change notification settings - Fork 3
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
A nullable type #105
Comments
Copied from the linked issue: That's interesting. I suppose it'd be analagous to Ideally though a syntactic construct for If we say hypothetically the implementation would be doable, how about this?:
Or a motivating example for the broader
|
How could we prevent the following without introducing our own typechecking?:
In the above design |
@samhh In theory this could be caught by running |
@OliverJAsh I don't think we can leave this for userland. This'd be a type error on output:
Where |
@samhh Perhaps it's OK to have a type error on output? I guess it's a trade-off: defer validation to TS/ |
I think the above would actually compile to string & (string | null) = string |
Some context: #102 (comment)
The text was updated successfully, but these errors were encountered: