Open j4k0xb opened 1 year ago
JavaScript and TypeScript Nightly version: v5.1.20230416
Code
typeof x < ''; function f() {}
For context, here's the whole code where I noticed it (common in minified js):
var gt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
Actual behaviour: typeof with < or <= gets interpreted as the begin of a type parameter and breaks all syntax highlighting after it.
typeof
<
<=
Expected behaviour: should be a relational operator.
JavaScript and TypeScript Nightly version: v5.1.20230416
Code
For context, here's the whole code where I noticed it (common in minified js):
Actual behaviour:
typeof
with<
or<=
gets interpreted as the begin of a type parameter and breaks all syntax highlighting after it.Expected behaviour: should be a relational operator.