no-duplicate-type-constituents
Configuration
rslint.config.ts
Rule Details
Disallows duplicate constituents in union or intersection types. Having the same type more than once in a union (|) or intersection (&) is redundant and can be removed without changing the type. This rule also flags explicit undefined on optional parameters, since the ? modifier already implies undefined.
Examples of incorrect code for this rule:
Examples of correct code for this rule: