Shrink relationComplexityError test size (#62754)

This commit is contained in:
Jake Bailey 2025-11-13 13:44:23 -08:00 committed by GitHub
parent 0f766a9aa7
commit ea48dedd7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 10 deletions

View File

@ -5,7 +5,7 @@ relationComplexityError.ts(12,5): error TS2859: Excessive complexity comparing t
==== relationComplexityError.ts (2 errors) ====
// Repro from #55630
type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7';
type T1 = `${Digits}${Digits}${Digits}${Digits}` | undefined;
type T2 = { a: string } | { b: number };

View File

@ -3,11 +3,11 @@
=== relationComplexityError.ts ===
// Repro from #55630
type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7';
>Digits : Symbol(Digits, Decl(relationComplexityError.ts, 0, 0))
type T1 = `${Digits}${Digits}${Digits}${Digits}` | undefined;
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 72))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 60))
>Digits : Symbol(Digits, Decl(relationComplexityError.ts, 0, 0))
>Digits : Symbol(Digits, Decl(relationComplexityError.ts, 0, 0))
>Digits : Symbol(Digits, Decl(relationComplexityError.ts, 0, 0))
@ -21,9 +21,9 @@ type T2 = { a: string } | { b: number };
function f1(x: T1, y: T1 & T2) {
>f1 : Symbol(f1, Decl(relationComplexityError.ts, 4, 40))
>x : Symbol(x, Decl(relationComplexityError.ts, 6, 12))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 72))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 60))
>y : Symbol(y, Decl(relationComplexityError.ts, 6, 18))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 72))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 60))
>T2 : Symbol(T2, Decl(relationComplexityError.ts, 3, 61))
x = y;
@ -34,9 +34,9 @@ function f1(x: T1, y: T1 & T2) {
function f2(x: T1 | null, y: T1 & T2) {
>f2 : Symbol(f2, Decl(relationComplexityError.ts, 8, 1))
>x : Symbol(x, Decl(relationComplexityError.ts, 10, 12))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 72))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 60))
>y : Symbol(y, Decl(relationComplexityError.ts, 10, 25))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 72))
>T1 : Symbol(T1, Decl(relationComplexityError.ts, 2, 60))
>T2 : Symbol(T2, Decl(relationComplexityError.ts, 3, 61))
x = y; // Complexity error

View File

@ -2,12 +2,12 @@
=== Performance Stats ===
Assignability cache: 2,500,000
Type Count: 25,000
Type Count: 10,000
=== relationComplexityError.ts ===
// Repro from #55630
type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7';
>Digits : Digits
> : ^^^^^^

View File

@ -3,7 +3,7 @@
// Repro from #55630
type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
type Digits = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7';
type T1 = `${Digits}${Digits}${Digits}${Digits}` | undefined;
type T2 = { a: string } | { b: number };