Skip to main content


Disallow duplicate constituents of union or intersection types.


Some problems reported by this rule are automatically fixable by the --fix ESLint command line option.


This rule requires type information to run.

TypeScript supports types ("constituents") within union and intersection types being duplicates of each other. However, developers typically expect each constituent to be unique within its intersection or union. Duplicate values make the code overly verbose and generally reduce readability.

module.exports = {
"rules": {
"@typescript-eslint/no-duplicate-type-constituents": "error"
Try this rule in the playground ↗

Rule Details

This rule disallows duplicate union or intersection constituents. We consider types to be duplicate if they evaluate to the same result in the type system. For example, given type A = string and type T = string | A, this rule would flag that A is the same type as string.

type T1 = 'A' | 'A';

type T2 = A | A | B;

type T3 = { a: string } & { a: string };

type T4 = [1, 2, 3] | [1, 2, 3];

type StringA = string;
type StringB = string;
type T5 = StringA | StringB;


This rule accepts an options object with the following properties:

interface Options {
ignoreIntersections?: boolean;
ignoreUnions?: boolean;

const defaultOptions: Options = [
{ ignoreIntersections: false, ignoreUnions: false },


When set to true, duplicate checks on intersection type constituents are ignored.


When set to true, duplicate checks on union type constituents are ignored.