Closed
Description
Repro
{
"rules": {
"@typescript-eslint/no-unnecessary-type-arguments": ["error"]
}
}
class FooEvent extends CustomEvent<any> {
}
Expected Result
to pass linting.
Actual Result
Fails linting, because the type CustomEvent<T>
has a default type any
for the generic T
, and thus it wants just CustomEvent
.
The problem is that CustomEvent
is defined as a global variable, thus the meaning of extends CustomEvent
is different than extends 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 |