-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
bugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugintriageWaiting for team members to take a lookWaiting for team members to take a look
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 have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
export type TuiLooseUnion<U> =
| U
| (U extends string
? Record<never, never> & string
: U extends number
? Record<never, never> & number
: U extends symbol
? Record<never, never> & symbol
: U extends bigint
? Record<never, never> & bigint
: never);
export enum TuiCurrency {
ArmenianDram = 'AMD',
// ...
}
export enum TuiCurrencyCode {
ArmenianDram = '051',
}
export type TuiCurrencyAutocompletion =
| keyof Record<TuiCurrency, string>
| keyof Record<TuiCurrencyCode, string>;
export type TuiCurrencyVariants =
| TuiCurrencyAutocompletion
| (TuiCurrency | TuiCurrencyCode | number | string | null);or string is overridden by SafeResourceUrl in this union type.
@Injectable()
export class TuiLazyLoadingService extends Observable<SafeResourceUrl | string> {}ESLint Config
module.exports = {
parser: "@typescript-eslint/parser",
rules: {
"@typescript-eslint/no-redundant-type-constituents": ["error"],
},
};tsconfig
Expected Result
No error here
Actual Result
Additional Info
No response
reduckted, splincode, boris-petrov, BjoernSaja, PeterBurner and 1 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugintriageWaiting for team members to take a lookWaiting for team members to take a look
{ "compilerOptions": { "strictNullChecks": true } }