mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
Type arguments followed by `in` must preserve the surrounding grammar context. Accept the binary operator in expressions while leaving it available as the separator in `for-in` heads. AI-assisted implementation.
6 lines
211 B
TypeScript
6 lines
211 B
TypeScript
const factory = null as unknown as string & { <T>(): T };
|
|
const object = {};
|
|
|
|
// Keep the instantiation before the for-in delimiter in this non-strict CommonJS file.
|
|
for (var key = factory<number> in object) {}
|