|
|
|
|
|
by qayxc
1245 days ago
|
|
It is strictly true. a<b,c>(d) is only valid JavaScript iff a, b, c, and d are values.
The TypeScript expression a<b,c>(d) where b and c are types is NOT JavaScript, since JavaScript doesn't have type expressions. The statement that every JavaScript program is a valid TypeScript program does not imply the opposite - hence strict superset. edit: there is indeed an edge case with the parentheses that throws the TypeScript parser off even if only values are involved. |
|
This is different than JSX or hashbang, where the set of non-JS syntax cannot legally overlap with existing syntax/semantics.