Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
class Foo<T> {
value: T
}
class Bar<T> {
foo = Foo<T>
}
new Bar()
ESLint Config
module.exports = {
"rules": {
"@typescript-eslint/no-unused-vars": ["error"]
}
}
tsconfig
Expected Result
To pick up that T in foo = Foo<T>
is being used.
Actual Result
'T' is defined but never used. 5:11 - 5:12
Additional Info
The ability to modify function references with generics is a new feature in TS 4.7, so this is probably the reason the rule hasn't updated yet to support it.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
5.30.5 |
@typescript-eslint/parser |
5.30.5 |
TypeScript |
4.7.4 |
ESLint |
8.15.0 |
node |
web |