Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Open
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
// Broken #1exportinterfaceTypeA{_id?:string}exporttypeTypeB=TypeA&{_id:string}// Broken #2functionsomething(value:object|object[]){// TODO}// Broken #3functionmockFetch(body:ArrayBuffer|Blob|Error|object|string|null=null){// TODO}
ESLint Config
module.exports={parser:"@typescript-eslint/parser",rules:{"@typescript-eslint/no-redundant-type-constituents":"error"},};
tsconfig
{}Expected Result
All the examples in the repo should be fine, they don't duplicate types
Actual Result
All three examples are broken:
- Example 1 doesn't like
_idreplacing_id? - Example 2 doesn't like union
object | object[](two different types...) - Example 3 doesn't like Error, becaue it's a type of
object, even though the two should be distinct
Additional Info
No response