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
typeWorkingArray={outerProperty:Array<{innerPropertyOne:string}&{innerPropertyTwo:string}>;};typeBrokenArray={outerProperty:Array<({innerPropertyOne:string}&{innerPropertyTwo:string})>;};
ESLint Config
module.exports={plugins:["@typescript-eslint"],extends:["plugin:@typescript-eslint/strict"],parser:"@typescript-eslint/parser",parserOptions:{tsconfigRootDir:__dirname,project:["./tsconfig.json"],ecmaVersion:"latest",},};
tsconfig
{"compilerOptions": {"strict":true }}Expected Result
interfaceWorkingArray{outerProperty:({innerPropertyOne:string}&{innerPropertyTwo:string})[];}interfaceBrokenArray{outerProperty:({innerPropertyOne:string}&{innerPropertyTwo:string})[];}
Actual Result
interfaceWorkingArray{outerProperty:({innerPropertyOne:string}&{innerPropertyTwo:string})[];}interfaceBrokenArray{outerProperty:{innerPropertyOne:string}&{innerPropertyTwo:string}[];}
6c6< outerProperty: { innerPropertyOne: string } & { innerPropertyTwo: string }[];---> outerProperty: ({ innerPropertyOne: string } & { innerPropertyTwo: string })[];
The meaning of theBrokenArray type should not be changed.
Additional Info
No response
Versions
| package | version |
|---|---|
@typescript-eslint/eslint-plugin | 5.42.1 |
@typescript-eslint/parser | 5.42.1 |
TypeScript | 4.8.4 |
ESLint | 8.27.0 |
node | 18.7.0 |