diff --git a/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts b/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts index 33237a8ae4e2..8d57fbf739bf 100644 --- a/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts +++ b/packages/eslint-plugin/src/rules/no-redundant-type-constituents.ts @@ -83,7 +83,13 @@ function describeLiteralType(type: ts.Type): string { } if (type.isLiteral()) { - return type.value.toString(); + if (typeof type.value === 'string' || typeof type.value === 'number') { + return type.value.toString(); + } + // Print ts.PseudoBigInt + return `${ + type.value.negative ? '-' : '' + }${type.value.base10Value.toString()}n`; } if (util.isTypeAnyType(type)) {