-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
No error thrown for index signature with declare modifier #12109
Copy link
Copy link
Closed
Labels
area: typescriptoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: parser
Description
Bug Report
- I would like to work on a fix!
Current behavior
No syntax error is thrown.
Input Code
class C {
declare [key: string]: string;
}Expected behavior
The parser should throw a syntax error 'declare' modifier cannot appear on an index signature.. Like TypeScript.
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
parse(code, { plugins: ["typescript"] });Environment
Possible Solution
Additional context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: typescriptoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: parser