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
typeX=string|number;// 'X' is defined but never used. 1:6 - 1:7typeId<T>=Textends{id: inferIdextendsX} ?Id :never;// X is used here!declarefunctionf<T>(value:T,id:Id<T>):void;f({id:1},2);
ESLint Config
module.exports={parser:"@typescript-eslint/parser",rules:{"@typescript-eslint/no-unused-vars":["error"],},};
tsconfig
{}
Expected Result
I expected no error.
Actual Result
There was an error on line 1.
Additional Info
This is using the newinfer
+extends
syntax from TypeScript 4.7.
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | 5.30.5 |
@typescript-eslint/parser | 5.30.5 |
TypeScript | 4.7.4 |
ESLint | 8.19.0 |
node | 18.4.0 |