Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
Repro
{"rules": {"@typescript-eslint/no-unnecessary-type-arguments": ["error"] }}classFooEventextendsCustomEvent<any>{}
Expected Result
to pass linting.
Actual Result
Fails linting, because the typeCustomEvent<T> has a default typeany for the genericT, and thus it wants justCustomEvent.
The problem is thatCustomEvent is defined as a global variable, thus the meaning ofextends CustomEvent is different thanextends CustomEvent<any>.
Additional Info
Versions
| package | version |
|---|---|
@typescript-eslint/eslint-plugin | 2.7.0 |
@typescript-eslint/parser | 2.7.0 |
TypeScript | 3.7.2 |
ESLint | 6.6.0 |
node | 12.12.0 |
npm | 6.11.3 |