-
-
Notifications
You must be signed in to change notification settings - Fork 669
Implement non-null assertions #443
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
Conversation
Is it valid? NOTE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
How about that?: export function testFn3(fn?: (() => Foo | null)): Foo | null {
return fn!();
} |
That fails to compile because we don't support export function testFn3(fn: (() => Foo | null) | null = null): Foo | null {
return fn!();
}
Something off with assigning |
Yeah. This relate to how handle of |
Leads us to nullable basic types as well then, like |
Same as |
Also found problem with |
Yeah, |
But may be |
Similar to #235, but implemented as another kind of assertion.