Skip to content

typeConstituentDuplicates

Reports duplicate types in unions and intersections.

✅ This rule is included in the ts logical presets.

Duplicate types in unions and intersections are redundant and can make code harder to read.

type Value = string | number | string;
type Combined = BaseType & ExtendedType & BaseType;

This rule is not configurable.

If you have generated types or complex type manipulations where duplicates are intentional, you may want to disable this rule.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.