stc
stc copied to clipboard
Check reserved identifiers in function params
Adds TS1359 validation for function parameter identifiers.
error[TS1359]: ExpectedIdentifierReservedKeyword {
span: Span {
lo: BytePos(
21,
),
hi: BytePos(
26,
),
ctxt: #0,
},
}
--> a.ts:1:20
|
1 | async function foo(await): Promise<void> {
| ^^^^^
New passing conforming tests:
async/es2017/functionDeclarations/asyncFunctionDeclaration5_es2017.ts
Also, I think this should be handled by the parser.
TS1xxx errors are for parser/lexer