You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reuse type assertion syntax with literal and tuple values for its type assertion #22872
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.
letb=true!;// type is trueletn=0!;// type is 0lets='a'!;// type is 'a'leta=[0!];// type is 0[]lett=[0]!;// type is [number]
Activity
yortus commentedon Mar 26, 2018
Looks the same as the suggestion in #10195 (comment).
falsandtru commentedon Mar 26, 2018
Yep, but that issue is not opened for this syntax.
yortus commentedon Mar 26, 2018
Sure, but since discussion is already going on there about this syntax, so you might want to at least reference it from this issue.
falsandtru commentedon Mar 26, 2018
Of course; I've invited that discussion now.
krryan commentedon Mar 26, 2018
Could you use it on inner types? As in,
And if so, what happens if you use it on an inner type, but not on outer types?
RyanCavanaugh commentedon Mar 26, 2018
Tracking at #10195. Please don't post solutions for other issues as standalone issues.