-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
No error thrown for constructors with type parameters #12064
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 issue
Description
Bug Report
- I would like to work on a fix!
Current behavior
No error thrown.
Input Code
class C {
constructor<T>(foo: T) {}
}Expected behavior
It throws Syntax Error Type parameters cannot appear on a constructor declaration. like TypeScript TS Playground Link
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
- Filename:
babel.config.js
{
"presets": ["@babel/preset-typescript"]
}Environment
I don't think environment information is needed because this issue is simple, but I will provide it if it is needed for you guys.
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 issue