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
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 havesearched for related issues and found none that matched my issue.
- I haveread the FAQ and my problem is not listed.
Playground Link
Repro Code
classFoo<T>{value:T}classBar<T>{foo=Foo<T>}newBar()
ESLint Config
module.exports={"rules":{"@typescript-eslint/no-unused-vars":["error"]}}
tsconfig
{"compilerOptions": {"strictNullChecks":true }}
Expected Result
To pick up that T infoo = 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 |