Closed
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
{
"rules": {
"@typescript-eslint/array-type": "error"
}
}
const foo: Array<new (...args: any[]) => void> = [];
Expected Result
const foo: (new (...args: any[]) => void)[] = [];
Actual Result
const foo: 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 |