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
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I haveread the FAQ and my problem is not listed.
Repro
{"rules": {"@typescript-eslint/array-type":"error" }}
constfoo:Array<new(...args:any[])=>void>=[];
Expected Result
constfoo:(new(...args:any[])=>void)[]=[];
Actual Result
constfoo:new(...args:any[])=>void[]=[];
The lack of parentheses changes the type to be "a function that returns void[]" rather than "an array of functions that return void"
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | 5.17.0 |
@typescript-eslint/parser | 5.17.0 |
TypeScript | 4.4.4 |
ESLint | 8.8.0 |
node | 8.1.0 |