-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Reuse type assertion syntax with literal and tuple values for its type assertion #22872
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
Comments
Looks the same as the suggestion in #10195 (comment). |
Yep, but that issue is not opened for this syntax. |
Sure, but since discussion is already going on there about this syntax, so you might want to at least reference it from this issue. |
Of course; I've invited that discussion now. |
Could you use it on inner types? As in, let t = [0!]!; // type is [0] And if so, what happens if you use it on an inner type, but not on outer types? let t = [0!]; // type is ??? |
Tracking at #10195. Please don't post solutions for other issues as standalone issues. |
This is very simple, clear, and easy syntax extension since this is reusing of verbose existing syntax. And it has no confusion neither semantic nor syntactic.
cc @sandersn @ahejlsberg
The text was updated successfully, but these errors were encountered: