Files
oxc-project__oxc/tasks/coverage/misc/fail/contextual-binding-lookahead-index-context.ts
camc314 47b83115f0 fix(parser): recognize contextual binding names in type lookaheads (#26532)
Recognize `await` and `yield` as binding names when looking ahead for TypeScript function types and index signatures. This allows valid syntax such as `(await: number) => void` and `interface I { [await: string]: unknown }`, while leaving contextual legality to actual parsing.
2026-09-10 14:05:25 +00:00

10 lines
219 B
TypeScript

function* generatorInterface() {
interface I { [yield: string]: unknown }
}
function* generatorClass() {
class C { [yield: string]: unknown }
}
async function asyncClass() {
class C { [await: string]: unknown }
}