From 56710dd5371dff3bf1c47c0857bbe69b1870f374 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Mon, 19 Mar 2018 16:29:11 -0700 Subject: [PATCH] Accept new baselines --- .../reference/conditionalTypes1.errors.txt | 19 +- .../baselines/reference/conditionalTypes1.js | 41 + .../reference/conditionalTypes1.symbols | 792 ++++++++++-------- .../reference/conditionalTypes1.types | 64 ++ 4 files changed, 550 insertions(+), 366 deletions(-) diff --git a/tests/baselines/reference/conditionalTypes1.errors.txt b/tests/baselines/reference/conditionalTypes1.errors.txt index afc020f663a..03bd00d117d 100644 --- a/tests/baselines/reference/conditionalTypes1.errors.txt +++ b/tests/baselines/reference/conditionalTypes1.errors.txt @@ -64,8 +64,8 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(159,5): error TS2 tests/cases/conformance/types/conditional/conditionalTypes1.ts(160,5): error TS2322: Type 'T' is not assignable to type 'ZeroOf'. Type 'string | number' is not assignable to type 'ZeroOf'. Type 'string' is not assignable to type 'ZeroOf'. -tests/cases/conformance/types/conditional/conditionalTypes1.ts(250,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'T1', but here has type 'Foo'. -tests/cases/conformance/types/conditional/conditionalTypes1.ts(275,43): error TS2322: Type 'T95' is not assignable to type 'T94'. +tests/cases/conformance/types/conditional/conditionalTypes1.ts(254,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'z' must be of type 'T1', but here has type 'Foo'. +tests/cases/conformance/types/conditional/conditionalTypes1.ts(279,43): error TS2322: Type 'T95' is not assignable to type 'T94'. Type 'boolean' is not assignable to type 'true'. @@ -318,6 +318,10 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(275,43): error TS !!! error TS2322: Type 'string' is not assignable to type 'ZeroOf'. } + type T35 = T[]; + type T36 = T extends { a: string } ? T extends { b: number } ? T35 : never : never; + type T37 = T extends { b: number } ? T extends { a: string } ? T35 : never : never; + type Extends = T extends U ? true : false; type If = C extends true ? T : F; type Not = If; @@ -477,4 +481,15 @@ tests/cases/conformance/types/conditional/conditionalTypes1.ts(275,43): error TS type Test1 = NonFooKeys1<{foo: 1, bar: 2, baz: 3}>; // "bar" | "baz" type Test2 = NonFooKeys2<{foo: 1, bar: 2, baz: 3}>; // "bar" | "baz" + + // Repro from #21729 + + interface Foo2 { foo: string; } + interface Bar2 { bar: string; } + type FooBar = Foo2 | Bar2; + declare interface ExtractFooBar { } + + type Extracted = { + [K in keyof Struct]: Struct[K] extends FooBar ? ExtractFooBar : Struct[K]; + } \ No newline at end of file diff --git a/tests/baselines/reference/conditionalTypes1.js b/tests/baselines/reference/conditionalTypes1.js index d941ba6454b..56774727745 100644 --- a/tests/baselines/reference/conditionalTypes1.js +++ b/tests/baselines/reference/conditionalTypes1.js @@ -161,6 +161,10 @@ function f21(x: T, y: ZeroOf) { y = x; // Error } +type T35 = T[]; +type T36 = T extends { a: string } ? T extends { b: number } ? T35 : never : never; +type T37 = T extends { b: number } ? T extends { a: string } ? T35 : never : never; + type Extends = T extends U ? true : false; type If = C extends true ? T : F; type Not = If; @@ -315,6 +319,17 @@ type NonFooKeys2 = Exclude; type Test1 = NonFooKeys1<{foo: 1, bar: 2, baz: 3}>; // "bar" | "baz" type Test2 = NonFooKeys2<{foo: 1, bar: 2, baz: 3}>; // "bar" | "baz" + +// Repro from #21729 + +interface Foo2 { foo: string; } +interface Bar2 { bar: string; } +type FooBar = Foo2 | Bar2; +declare interface ExtractFooBar { } + +type Extracted = { + [K in keyof Struct]: Struct[K] extends FooBar ? ExtractFooBar : Struct[K]; +} //// [conditionalTypes1.js] @@ -517,6 +532,20 @@ declare type ZeroOf = T extends number ? 0 declare function zeroOf(value: T): ZeroOf; declare function f20(n: number, b: boolean, x: number | boolean, y: T): void; declare function f21(x: T, y: ZeroOf): void; +declare type T35 = T[]; +declare type T36 = T extends { + a: string; +} ? T extends { + b: number; +} ? T35 : never : never; +declare type T37 = T extends { + b: number; +} ? T extends { + a: string; +} ? T35 : never : never; declare type Extends = T extends U ? true : false; declare type If = C extends true ? T : F; declare type Not = If; @@ -624,3 +653,15 @@ declare type Test2 = NonFooKeys2<{ bar: 2; baz: 3; }>; +interface Foo2 { + foo: string; +} +interface Bar2 { + bar: string; +} +declare type FooBar = Foo2 | Bar2; +declare interface ExtractFooBar { +} +declare type Extracted = { + [K in keyof Struct]: Struct[K] extends FooBar ? ExtractFooBar : Struct[K]; +}; diff --git a/tests/baselines/reference/conditionalTypes1.symbols b/tests/baselines/reference/conditionalTypes1.symbols index 5e72d1ebd3c..e9e94a840d2 100644 --- a/tests/baselines/reference/conditionalTypes1.symbols +++ b/tests/baselines/reference/conditionalTypes1.symbols @@ -612,608 +612,672 @@ function f21(x: T, y: ZeroOf) { >x : Symbol(x, Decl(conditionalTypes1.ts, 155, 40)) } +type T35 = T[]; +>T35 : Symbol(T35, Decl(conditionalTypes1.ts, 160, 1)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 162, 9)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 162, 20)) +>b : Symbol(b, Decl(conditionalTypes1.ts, 162, 31)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 162, 9)) + +type T36 = T extends { a: string } ? T extends { b: number } ? T35 : never : never; +>T36 : Symbol(T36, Decl(conditionalTypes1.ts, 162, 51)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 163, 9)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 163, 9)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 163, 25)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 163, 9)) +>b : Symbol(b, Decl(conditionalTypes1.ts, 163, 51)) +>T35 : Symbol(T35, Decl(conditionalTypes1.ts, 160, 1)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 163, 9)) + +type T37 = T extends { b: number } ? T extends { a: string } ? T35 : never : never; +>T37 : Symbol(T37, Decl(conditionalTypes1.ts, 163, 89)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 164, 9)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 164, 9)) +>b : Symbol(b, Decl(conditionalTypes1.ts, 164, 25)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 164, 9)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 164, 51)) +>T35 : Symbol(T35, Decl(conditionalTypes1.ts, 160, 1)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 164, 9)) + type Extends = T extends U ? true : false; ->Extends : Symbol(Extends, Decl(conditionalTypes1.ts, 160, 1)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 162, 13)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 162, 15)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 162, 13)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 162, 15)) +>Extends : Symbol(Extends, Decl(conditionalTypes1.ts, 164, 89)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 166, 13)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 166, 15)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 166, 13)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 166, 15)) type If = C extends true ? T : F; ->If : Symbol(If, Decl(conditionalTypes1.ts, 162, 48)) ->C : Symbol(C, Decl(conditionalTypes1.ts, 163, 8)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 163, 26)) ->F : Symbol(F, Decl(conditionalTypes1.ts, 163, 29)) ->C : Symbol(C, Decl(conditionalTypes1.ts, 163, 8)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 163, 26)) ->F : Symbol(F, Decl(conditionalTypes1.ts, 163, 29)) +>If : Symbol(If, Decl(conditionalTypes1.ts, 166, 48)) +>C : Symbol(C, Decl(conditionalTypes1.ts, 167, 8)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 167, 26)) +>F : Symbol(F, Decl(conditionalTypes1.ts, 167, 29)) +>C : Symbol(C, Decl(conditionalTypes1.ts, 167, 8)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 167, 26)) +>F : Symbol(F, Decl(conditionalTypes1.ts, 167, 29)) type Not = If; ->Not : Symbol(Not, Decl(conditionalTypes1.ts, 163, 58)) ->C : Symbol(C, Decl(conditionalTypes1.ts, 164, 9)) ->If : Symbol(If, Decl(conditionalTypes1.ts, 162, 48)) ->C : Symbol(C, Decl(conditionalTypes1.ts, 164, 9)) +>Not : Symbol(Not, Decl(conditionalTypes1.ts, 167, 58)) +>C : Symbol(C, Decl(conditionalTypes1.ts, 168, 9)) +>If : Symbol(If, Decl(conditionalTypes1.ts, 166, 48)) +>C : Symbol(C, Decl(conditionalTypes1.ts, 168, 9)) type And = If; ->And : Symbol(And, Decl(conditionalTypes1.ts, 164, 49)) ->A : Symbol(A, Decl(conditionalTypes1.ts, 165, 9)) ->B : Symbol(B, Decl(conditionalTypes1.ts, 165, 27)) ->If : Symbol(If, Decl(conditionalTypes1.ts, 162, 48)) ->A : Symbol(A, Decl(conditionalTypes1.ts, 165, 9)) ->B : Symbol(B, Decl(conditionalTypes1.ts, 165, 27)) +>And : Symbol(And, Decl(conditionalTypes1.ts, 168, 49)) +>A : Symbol(A, Decl(conditionalTypes1.ts, 169, 9)) +>B : Symbol(B, Decl(conditionalTypes1.ts, 169, 27)) +>If : Symbol(If, Decl(conditionalTypes1.ts, 166, 48)) +>A : Symbol(A, Decl(conditionalTypes1.ts, 169, 9)) +>B : Symbol(B, Decl(conditionalTypes1.ts, 169, 27)) type Or = If; ->Or : Symbol(Or, Decl(conditionalTypes1.ts, 165, 65)) ->A : Symbol(A, Decl(conditionalTypes1.ts, 166, 8)) ->B : Symbol(B, Decl(conditionalTypes1.ts, 166, 26)) ->If : Symbol(If, Decl(conditionalTypes1.ts, 162, 48)) ->A : Symbol(A, Decl(conditionalTypes1.ts, 166, 8)) ->B : Symbol(B, Decl(conditionalTypes1.ts, 166, 26)) +>Or : Symbol(Or, Decl(conditionalTypes1.ts, 169, 65)) +>A : Symbol(A, Decl(conditionalTypes1.ts, 170, 8)) +>B : Symbol(B, Decl(conditionalTypes1.ts, 170, 26)) +>If : Symbol(If, Decl(conditionalTypes1.ts, 166, 48)) +>A : Symbol(A, Decl(conditionalTypes1.ts, 170, 8)) +>B : Symbol(B, Decl(conditionalTypes1.ts, 170, 26)) type IsString = Extends; ->IsString : Symbol(IsString, Decl(conditionalTypes1.ts, 166, 63)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 168, 14)) ->Extends : Symbol(Extends, Decl(conditionalTypes1.ts, 160, 1)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 168, 14)) +>IsString : Symbol(IsString, Decl(conditionalTypes1.ts, 170, 63)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 172, 14)) +>Extends : Symbol(Extends, Decl(conditionalTypes1.ts, 164, 89)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 172, 14)) type Q1 = IsString; // false ->Q1 : Symbol(Q1, Decl(conditionalTypes1.ts, 168, 38)) ->IsString : Symbol(IsString, Decl(conditionalTypes1.ts, 166, 63)) +>Q1 : Symbol(Q1, Decl(conditionalTypes1.ts, 172, 38)) +>IsString : Symbol(IsString, Decl(conditionalTypes1.ts, 170, 63)) type Q2 = IsString<"abc">; // true ->Q2 : Symbol(Q2, Decl(conditionalTypes1.ts, 170, 27)) ->IsString : Symbol(IsString, Decl(conditionalTypes1.ts, 166, 63)) +>Q2 : Symbol(Q2, Decl(conditionalTypes1.ts, 174, 27)) +>IsString : Symbol(IsString, Decl(conditionalTypes1.ts, 170, 63)) type Q3 = IsString; // boolean ->Q3 : Symbol(Q3, Decl(conditionalTypes1.ts, 171, 26)) ->IsString : Symbol(IsString, Decl(conditionalTypes1.ts, 166, 63)) +>Q3 : Symbol(Q3, Decl(conditionalTypes1.ts, 175, 26)) +>IsString : Symbol(IsString, Decl(conditionalTypes1.ts, 170, 63)) type Q4 = IsString; // never ->Q4 : Symbol(Q4, Decl(conditionalTypes1.ts, 172, 24)) ->IsString : Symbol(IsString, Decl(conditionalTypes1.ts, 166, 63)) +>Q4 : Symbol(Q4, Decl(conditionalTypes1.ts, 176, 24)) +>IsString : Symbol(IsString, Decl(conditionalTypes1.ts, 170, 63)) type N1 = Not; // true ->N1 : Symbol(N1, Decl(conditionalTypes1.ts, 173, 26)) ->Not : Symbol(Not, Decl(conditionalTypes1.ts, 163, 58)) +>N1 : Symbol(N1, Decl(conditionalTypes1.ts, 177, 26)) +>Not : Symbol(Not, Decl(conditionalTypes1.ts, 167, 58)) type N2 = Not; // false ->N2 : Symbol(N2, Decl(conditionalTypes1.ts, 175, 21)) ->Not : Symbol(Not, Decl(conditionalTypes1.ts, 163, 58)) +>N2 : Symbol(N2, Decl(conditionalTypes1.ts, 179, 21)) +>Not : Symbol(Not, Decl(conditionalTypes1.ts, 167, 58)) type N3 = Not; // boolean ->N3 : Symbol(N3, Decl(conditionalTypes1.ts, 176, 20)) ->Not : Symbol(Not, Decl(conditionalTypes1.ts, 163, 58)) +>N3 : Symbol(N3, Decl(conditionalTypes1.ts, 180, 20)) +>Not : Symbol(Not, Decl(conditionalTypes1.ts, 167, 58)) type A1 = And; // false ->A1 : Symbol(A1, Decl(conditionalTypes1.ts, 177, 23)) ->And : Symbol(And, Decl(conditionalTypes1.ts, 164, 49)) +>A1 : Symbol(A1, Decl(conditionalTypes1.ts, 181, 23)) +>And : Symbol(And, Decl(conditionalTypes1.ts, 168, 49)) type A2 = And; // false ->A2 : Symbol(A2, Decl(conditionalTypes1.ts, 179, 28)) ->And : Symbol(And, Decl(conditionalTypes1.ts, 164, 49)) +>A2 : Symbol(A2, Decl(conditionalTypes1.ts, 183, 28)) +>And : Symbol(And, Decl(conditionalTypes1.ts, 168, 49)) type A3 = And; // false ->A3 : Symbol(A3, Decl(conditionalTypes1.ts, 180, 27)) ->And : Symbol(And, Decl(conditionalTypes1.ts, 164, 49)) +>A3 : Symbol(A3, Decl(conditionalTypes1.ts, 184, 27)) +>And : Symbol(And, Decl(conditionalTypes1.ts, 168, 49)) type A4 = And; // true ->A4 : Symbol(A4, Decl(conditionalTypes1.ts, 181, 27)) ->And : Symbol(And, Decl(conditionalTypes1.ts, 164, 49)) +>A4 : Symbol(A4, Decl(conditionalTypes1.ts, 185, 27)) +>And : Symbol(And, Decl(conditionalTypes1.ts, 168, 49)) type A5 = And; // false ->A5 : Symbol(A5, Decl(conditionalTypes1.ts, 182, 26)) ->And : Symbol(And, Decl(conditionalTypes1.ts, 164, 49)) +>A5 : Symbol(A5, Decl(conditionalTypes1.ts, 186, 26)) +>And : Symbol(And, Decl(conditionalTypes1.ts, 168, 49)) type A6 = And; // false ->A6 : Symbol(A6, Decl(conditionalTypes1.ts, 183, 30)) ->And : Symbol(And, Decl(conditionalTypes1.ts, 164, 49)) +>A6 : Symbol(A6, Decl(conditionalTypes1.ts, 187, 30)) +>And : Symbol(And, Decl(conditionalTypes1.ts, 168, 49)) type A7 = And; // boolean ->A7 : Symbol(A7, Decl(conditionalTypes1.ts, 184, 30)) ->And : Symbol(And, Decl(conditionalTypes1.ts, 164, 49)) +>A7 : Symbol(A7, Decl(conditionalTypes1.ts, 188, 30)) +>And : Symbol(And, Decl(conditionalTypes1.ts, 168, 49)) type A8 = And; // boolean ->A8 : Symbol(A8, Decl(conditionalTypes1.ts, 185, 29)) ->And : Symbol(And, Decl(conditionalTypes1.ts, 164, 49)) +>A8 : Symbol(A8, Decl(conditionalTypes1.ts, 189, 29)) +>And : Symbol(And, Decl(conditionalTypes1.ts, 168, 49)) type A9 = And; // boolean ->A9 : Symbol(A9, Decl(conditionalTypes1.ts, 186, 29)) ->And : Symbol(And, Decl(conditionalTypes1.ts, 164, 49)) +>A9 : Symbol(A9, Decl(conditionalTypes1.ts, 190, 29)) +>And : Symbol(And, Decl(conditionalTypes1.ts, 168, 49)) type O1 = Or; // false ->O1 : Symbol(O1, Decl(conditionalTypes1.ts, 187, 32)) ->Or : Symbol(Or, Decl(conditionalTypes1.ts, 165, 65)) +>O1 : Symbol(O1, Decl(conditionalTypes1.ts, 191, 32)) +>Or : Symbol(Or, Decl(conditionalTypes1.ts, 169, 65)) type O2 = Or; // true ->O2 : Symbol(O2, Decl(conditionalTypes1.ts, 189, 27)) ->Or : Symbol(Or, Decl(conditionalTypes1.ts, 165, 65)) +>O2 : Symbol(O2, Decl(conditionalTypes1.ts, 193, 27)) +>Or : Symbol(Or, Decl(conditionalTypes1.ts, 169, 65)) type O3 = Or; // true ->O3 : Symbol(O3, Decl(conditionalTypes1.ts, 190, 26)) ->Or : Symbol(Or, Decl(conditionalTypes1.ts, 165, 65)) +>O3 : Symbol(O3, Decl(conditionalTypes1.ts, 194, 26)) +>Or : Symbol(Or, Decl(conditionalTypes1.ts, 169, 65)) type O4 = Or; // true ->O4 : Symbol(O4, Decl(conditionalTypes1.ts, 191, 26)) ->Or : Symbol(Or, Decl(conditionalTypes1.ts, 165, 65)) +>O4 : Symbol(O4, Decl(conditionalTypes1.ts, 195, 26)) +>Or : Symbol(Or, Decl(conditionalTypes1.ts, 169, 65)) type O5 = Or; // boolean ->O5 : Symbol(O5, Decl(conditionalTypes1.ts, 192, 25)) ->Or : Symbol(Or, Decl(conditionalTypes1.ts, 165, 65)) +>O5 : Symbol(O5, Decl(conditionalTypes1.ts, 196, 25)) +>Or : Symbol(Or, Decl(conditionalTypes1.ts, 169, 65)) type O6 = Or; // boolean ->O6 : Symbol(O6, Decl(conditionalTypes1.ts, 193, 29)) ->Or : Symbol(Or, Decl(conditionalTypes1.ts, 165, 65)) +>O6 : Symbol(O6, Decl(conditionalTypes1.ts, 197, 29)) +>Or : Symbol(Or, Decl(conditionalTypes1.ts, 169, 65)) type O7 = Or; // true ->O7 : Symbol(O7, Decl(conditionalTypes1.ts, 194, 29)) ->Or : Symbol(Or, Decl(conditionalTypes1.ts, 165, 65)) +>O7 : Symbol(O7, Decl(conditionalTypes1.ts, 198, 29)) +>Or : Symbol(Or, Decl(conditionalTypes1.ts, 169, 65)) type O8 = Or; // true ->O8 : Symbol(O8, Decl(conditionalTypes1.ts, 195, 28)) ->Or : Symbol(Or, Decl(conditionalTypes1.ts, 165, 65)) +>O8 : Symbol(O8, Decl(conditionalTypes1.ts, 199, 28)) +>Or : Symbol(Or, Decl(conditionalTypes1.ts, 169, 65)) type O9 = Or; // boolean ->O9 : Symbol(O9, Decl(conditionalTypes1.ts, 196, 28)) ->Or : Symbol(Or, Decl(conditionalTypes1.ts, 165, 65)) +>O9 : Symbol(O9, Decl(conditionalTypes1.ts, 200, 28)) +>Or : Symbol(Or, Decl(conditionalTypes1.ts, 169, 65)) type T40 = never extends never ? true : false; // true ->T40 : Symbol(T40, Decl(conditionalTypes1.ts, 197, 31)) +>T40 : Symbol(T40, Decl(conditionalTypes1.ts, 201, 31)) type T41 = number extends never ? true : false; // false ->T41 : Symbol(T41, Decl(conditionalTypes1.ts, 199, 46)) +>T41 : Symbol(T41, Decl(conditionalTypes1.ts, 203, 46)) type T42 = never extends number ? true : false; // true ->T42 : Symbol(T42, Decl(conditionalTypes1.ts, 200, 47)) +>T42 : Symbol(T42, Decl(conditionalTypes1.ts, 204, 47)) type IsNever = [T] extends [never] ? true : false; ->IsNever : Symbol(IsNever, Decl(conditionalTypes1.ts, 201, 47)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 203, 13)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 203, 13)) +>IsNever : Symbol(IsNever, Decl(conditionalTypes1.ts, 205, 47)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 207, 13)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 207, 13)) type T50 = IsNever; // true ->T50 : Symbol(T50, Decl(conditionalTypes1.ts, 203, 53)) ->IsNever : Symbol(IsNever, Decl(conditionalTypes1.ts, 201, 47)) +>T50 : Symbol(T50, Decl(conditionalTypes1.ts, 207, 53)) +>IsNever : Symbol(IsNever, Decl(conditionalTypes1.ts, 205, 47)) type T51 = IsNever; // false ->T51 : Symbol(T51, Decl(conditionalTypes1.ts, 205, 26)) ->IsNever : Symbol(IsNever, Decl(conditionalTypes1.ts, 201, 47)) +>T51 : Symbol(T51, Decl(conditionalTypes1.ts, 209, 26)) +>IsNever : Symbol(IsNever, Decl(conditionalTypes1.ts, 205, 47)) type T52 = IsNever; // false ->T52 : Symbol(T52, Decl(conditionalTypes1.ts, 206, 27)) ->IsNever : Symbol(IsNever, Decl(conditionalTypes1.ts, 201, 47)) +>T52 : Symbol(T52, Decl(conditionalTypes1.ts, 210, 27)) +>IsNever : Symbol(IsNever, Decl(conditionalTypes1.ts, 205, 47)) // Repros from #21664 type Eq = T extends U ? U extends T ? true : false : false; ->Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 207, 24)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 211, 8)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 211, 10)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 211, 8)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 211, 10)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 211, 10)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 211, 8)) +>Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 211, 24)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 215, 8)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 215, 10)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 215, 8)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 215, 10)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 215, 10)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 215, 8)) type T60 = Eq; // true ->T60 : Symbol(T60, Decl(conditionalTypes1.ts, 211, 65)) ->Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 207, 24)) +>T60 : Symbol(T60, Decl(conditionalTypes1.ts, 215, 65)) +>Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 211, 24)) type T61 = Eq; // false ->T61 : Symbol(T61, Decl(conditionalTypes1.ts, 212, 26)) ->Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 207, 24)) +>T61 : Symbol(T61, Decl(conditionalTypes1.ts, 216, 26)) +>Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 211, 24)) type T62 = Eq; // false ->T62 : Symbol(T62, Decl(conditionalTypes1.ts, 213, 27)) ->Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 207, 24)) +>T62 : Symbol(T62, Decl(conditionalTypes1.ts, 217, 27)) +>Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 211, 24)) type T63 = Eq; // true ->T63 : Symbol(T63, Decl(conditionalTypes1.ts, 214, 27)) ->Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 207, 24)) +>T63 : Symbol(T63, Decl(conditionalTypes1.ts, 218, 27)) +>Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 211, 24)) type Eq1 = Eq extends false ? false : true; ->Eq1 : Symbol(Eq1, Decl(conditionalTypes1.ts, 215, 28)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 217, 9)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 217, 11)) ->Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 207, 24)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 217, 9)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 217, 11)) +>Eq1 : Symbol(Eq1, Decl(conditionalTypes1.ts, 219, 28)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 221, 9)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 221, 11)) +>Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 211, 24)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 221, 9)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 221, 11)) type T70 = Eq1; // true ->T70 : Symbol(T70, Decl(conditionalTypes1.ts, 217, 55)) ->Eq1 : Symbol(Eq1, Decl(conditionalTypes1.ts, 215, 28)) +>T70 : Symbol(T70, Decl(conditionalTypes1.ts, 221, 55)) +>Eq1 : Symbol(Eq1, Decl(conditionalTypes1.ts, 219, 28)) type T71 = Eq1; // false ->T71 : Symbol(T71, Decl(conditionalTypes1.ts, 218, 27)) ->Eq1 : Symbol(Eq1, Decl(conditionalTypes1.ts, 215, 28)) +>T71 : Symbol(T71, Decl(conditionalTypes1.ts, 222, 27)) +>Eq1 : Symbol(Eq1, Decl(conditionalTypes1.ts, 219, 28)) type T72 = Eq1; // false ->T72 : Symbol(T72, Decl(conditionalTypes1.ts, 219, 28)) ->Eq1 : Symbol(Eq1, Decl(conditionalTypes1.ts, 215, 28)) +>T72 : Symbol(T72, Decl(conditionalTypes1.ts, 223, 28)) +>Eq1 : Symbol(Eq1, Decl(conditionalTypes1.ts, 219, 28)) type T73 = Eq1; // true ->T73 : Symbol(T73, Decl(conditionalTypes1.ts, 220, 28)) ->Eq1 : Symbol(Eq1, Decl(conditionalTypes1.ts, 215, 28)) +>T73 : Symbol(T73, Decl(conditionalTypes1.ts, 224, 28)) +>Eq1 : Symbol(Eq1, Decl(conditionalTypes1.ts, 219, 28)) type Eq2 = Eq extends true ? true : false; ->Eq2 : Symbol(Eq2, Decl(conditionalTypes1.ts, 221, 29)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 223, 9)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 223, 11)) ->Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 207, 24)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 223, 9)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 223, 11)) +>Eq2 : Symbol(Eq2, Decl(conditionalTypes1.ts, 225, 29)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 227, 9)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 227, 11)) +>Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 211, 24)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 227, 9)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 227, 11)) type T80 = Eq2; // true ->T80 : Symbol(T80, Decl(conditionalTypes1.ts, 223, 54)) ->Eq2 : Symbol(Eq2, Decl(conditionalTypes1.ts, 221, 29)) +>T80 : Symbol(T80, Decl(conditionalTypes1.ts, 227, 54)) +>Eq2 : Symbol(Eq2, Decl(conditionalTypes1.ts, 225, 29)) type T81 = Eq2; // false ->T81 : Symbol(T81, Decl(conditionalTypes1.ts, 224, 27)) ->Eq2 : Symbol(Eq2, Decl(conditionalTypes1.ts, 221, 29)) +>T81 : Symbol(T81, Decl(conditionalTypes1.ts, 228, 27)) +>Eq2 : Symbol(Eq2, Decl(conditionalTypes1.ts, 225, 29)) type T82 = Eq2; // false ->T82 : Symbol(T82, Decl(conditionalTypes1.ts, 225, 28)) ->Eq2 : Symbol(Eq2, Decl(conditionalTypes1.ts, 221, 29)) +>T82 : Symbol(T82, Decl(conditionalTypes1.ts, 229, 28)) +>Eq2 : Symbol(Eq2, Decl(conditionalTypes1.ts, 225, 29)) type T83 = Eq2; // true ->T83 : Symbol(T83, Decl(conditionalTypes1.ts, 226, 28)) ->Eq2 : Symbol(Eq2, Decl(conditionalTypes1.ts, 221, 29)) +>T83 : Symbol(T83, Decl(conditionalTypes1.ts, 230, 28)) +>Eq2 : Symbol(Eq2, Decl(conditionalTypes1.ts, 225, 29)) // Repro from #21756 type Foo = T extends string ? boolean : number; ->Foo : Symbol(Foo, Decl(conditionalTypes1.ts, 227, 29)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 231, 9)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 231, 9)) +>Foo : Symbol(Foo, Decl(conditionalTypes1.ts, 231, 29)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 235, 9)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 235, 9)) type Bar = T extends string ? boolean : number; ->Bar : Symbol(Bar, Decl(conditionalTypes1.ts, 231, 50)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 232, 9)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 232, 9)) +>Bar : Symbol(Bar, Decl(conditionalTypes1.ts, 235, 50)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 236, 9)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 236, 9)) const convert = (value: Foo): Bar => value; ->convert : Symbol(convert, Decl(conditionalTypes1.ts, 233, 5)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 233, 17)) ->value : Symbol(value, Decl(conditionalTypes1.ts, 233, 20)) ->Foo : Symbol(Foo, Decl(conditionalTypes1.ts, 227, 29)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 233, 17)) ->Bar : Symbol(Bar, Decl(conditionalTypes1.ts, 231, 50)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 233, 17)) ->value : Symbol(value, Decl(conditionalTypes1.ts, 233, 20)) +>convert : Symbol(convert, Decl(conditionalTypes1.ts, 237, 5)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 237, 17)) +>value : Symbol(value, Decl(conditionalTypes1.ts, 237, 20)) +>Foo : Symbol(Foo, Decl(conditionalTypes1.ts, 231, 29)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 237, 17)) +>Bar : Symbol(Bar, Decl(conditionalTypes1.ts, 235, 50)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 237, 17)) +>value : Symbol(value, Decl(conditionalTypes1.ts, 237, 20)) type Baz = Foo; ->Baz : Symbol(Baz, Decl(conditionalTypes1.ts, 233, 52)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 235, 9)) ->Foo : Symbol(Foo, Decl(conditionalTypes1.ts, 227, 29)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 235, 9)) +>Baz : Symbol(Baz, Decl(conditionalTypes1.ts, 237, 52)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 239, 9)) +>Foo : Symbol(Foo, Decl(conditionalTypes1.ts, 231, 29)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 239, 9)) const convert2 = (value: Foo): Baz => value; ->convert2 : Symbol(convert2, Decl(conditionalTypes1.ts, 236, 5)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 236, 18)) ->value : Symbol(value, Decl(conditionalTypes1.ts, 236, 21)) ->Foo : Symbol(Foo, Decl(conditionalTypes1.ts, 227, 29)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 236, 18)) ->Baz : Symbol(Baz, Decl(conditionalTypes1.ts, 233, 52)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 236, 18)) ->value : Symbol(value, Decl(conditionalTypes1.ts, 236, 21)) +>convert2 : Symbol(convert2, Decl(conditionalTypes1.ts, 240, 5)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 240, 18)) +>value : Symbol(value, Decl(conditionalTypes1.ts, 240, 21)) +>Foo : Symbol(Foo, Decl(conditionalTypes1.ts, 231, 29)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 240, 18)) +>Baz : Symbol(Baz, Decl(conditionalTypes1.ts, 237, 52)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 240, 18)) +>value : Symbol(value, Decl(conditionalTypes1.ts, 240, 21)) function f31() { ->f31 : Symbol(f31, Decl(conditionalTypes1.ts, 236, 53)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 238, 13)) +>f31 : Symbol(f31, Decl(conditionalTypes1.ts, 240, 53)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 242, 13)) type T1 = T extends string ? boolean : number; ->T1 : Symbol(T1, Decl(conditionalTypes1.ts, 238, 19)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 238, 13)) +>T1 : Symbol(T1, Decl(conditionalTypes1.ts, 242, 19)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 242, 13)) type T2 = T extends string ? boolean : number; ->T2 : Symbol(T2, Decl(conditionalTypes1.ts, 239, 50)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 238, 13)) +>T2 : Symbol(T2, Decl(conditionalTypes1.ts, 243, 50)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 242, 13)) var x: T1; ->x : Symbol(x, Decl(conditionalTypes1.ts, 241, 7), Decl(conditionalTypes1.ts, 242, 7)) ->T1 : Symbol(T1, Decl(conditionalTypes1.ts, 238, 19)) +>x : Symbol(x, Decl(conditionalTypes1.ts, 245, 7), Decl(conditionalTypes1.ts, 246, 7)) +>T1 : Symbol(T1, Decl(conditionalTypes1.ts, 242, 19)) var x: T2; ->x : Symbol(x, Decl(conditionalTypes1.ts, 241, 7), Decl(conditionalTypes1.ts, 242, 7)) ->T2 : Symbol(T2, Decl(conditionalTypes1.ts, 239, 50)) +>x : Symbol(x, Decl(conditionalTypes1.ts, 245, 7), Decl(conditionalTypes1.ts, 246, 7)) +>T2 : Symbol(T2, Decl(conditionalTypes1.ts, 243, 50)) } function f32() { ->f32 : Symbol(f32, Decl(conditionalTypes1.ts, 243, 1)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 245, 13)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 245, 15)) +>f32 : Symbol(f32, Decl(conditionalTypes1.ts, 247, 1)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 249, 13)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 249, 15)) type T1 = T & U extends string ? boolean : number; ->T1 : Symbol(T1, Decl(conditionalTypes1.ts, 245, 22)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 245, 13)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 245, 15)) +>T1 : Symbol(T1, Decl(conditionalTypes1.ts, 249, 22)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 249, 13)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 249, 15)) type T2 = Foo; ->T2 : Symbol(T2, Decl(conditionalTypes1.ts, 246, 54)) ->Foo : Symbol(Foo, Decl(conditionalTypes1.ts, 227, 29)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 245, 13)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 245, 15)) +>T2 : Symbol(T2, Decl(conditionalTypes1.ts, 250, 54)) +>Foo : Symbol(Foo, Decl(conditionalTypes1.ts, 231, 29)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 249, 13)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 249, 15)) var z: T1; ->z : Symbol(z, Decl(conditionalTypes1.ts, 248, 7), Decl(conditionalTypes1.ts, 249, 7)) ->T1 : Symbol(T1, Decl(conditionalTypes1.ts, 245, 22)) +>z : Symbol(z, Decl(conditionalTypes1.ts, 252, 7), Decl(conditionalTypes1.ts, 253, 7)) +>T1 : Symbol(T1, Decl(conditionalTypes1.ts, 249, 22)) var z: T2; // Error, T2 is distributive, T1 isn't ->z : Symbol(z, Decl(conditionalTypes1.ts, 248, 7), Decl(conditionalTypes1.ts, 249, 7)) ->T2 : Symbol(T2, Decl(conditionalTypes1.ts, 246, 54)) +>z : Symbol(z, Decl(conditionalTypes1.ts, 252, 7), Decl(conditionalTypes1.ts, 253, 7)) +>T2 : Symbol(T2, Decl(conditionalTypes1.ts, 250, 54)) } function f33() { ->f33 : Symbol(f33, Decl(conditionalTypes1.ts, 250, 1)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 252, 13)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 252, 15)) +>f33 : Symbol(f33, Decl(conditionalTypes1.ts, 254, 1)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 256, 13)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 256, 15)) type T1 = Foo; ->T1 : Symbol(T1, Decl(conditionalTypes1.ts, 252, 22)) ->Foo : Symbol(Foo, Decl(conditionalTypes1.ts, 227, 29)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 252, 13)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 252, 15)) +>T1 : Symbol(T1, Decl(conditionalTypes1.ts, 256, 22)) +>Foo : Symbol(Foo, Decl(conditionalTypes1.ts, 231, 29)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 256, 13)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 256, 15)) type T2 = Bar; ->T2 : Symbol(T2, Decl(conditionalTypes1.ts, 253, 25)) ->Bar : Symbol(Bar, Decl(conditionalTypes1.ts, 231, 50)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 252, 13)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 252, 15)) +>T2 : Symbol(T2, Decl(conditionalTypes1.ts, 257, 25)) +>Bar : Symbol(Bar, Decl(conditionalTypes1.ts, 235, 50)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 256, 13)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 256, 15)) var z: T1; ->z : Symbol(z, Decl(conditionalTypes1.ts, 255, 7), Decl(conditionalTypes1.ts, 256, 7)) ->T1 : Symbol(T1, Decl(conditionalTypes1.ts, 252, 22)) +>z : Symbol(z, Decl(conditionalTypes1.ts, 259, 7), Decl(conditionalTypes1.ts, 260, 7)) +>T1 : Symbol(T1, Decl(conditionalTypes1.ts, 256, 22)) var z: T2; ->z : Symbol(z, Decl(conditionalTypes1.ts, 255, 7), Decl(conditionalTypes1.ts, 256, 7)) ->T2 : Symbol(T2, Decl(conditionalTypes1.ts, 253, 25)) +>z : Symbol(z, Decl(conditionalTypes1.ts, 259, 7), Decl(conditionalTypes1.ts, 260, 7)) +>T2 : Symbol(T2, Decl(conditionalTypes1.ts, 257, 25)) } // Repro from #21823 type T90 = T extends 0 ? 0 : () => 0; ->T90 : Symbol(T90, Decl(conditionalTypes1.ts, 257, 1)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 261, 9)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 261, 9)) +>T90 : Symbol(T90, Decl(conditionalTypes1.ts, 261, 1)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 265, 9)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 265, 9)) type T91 = T extends 0 ? 0 : () => 0; ->T91 : Symbol(T91, Decl(conditionalTypes1.ts, 261, 40)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 262, 9)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 262, 9)) +>T91 : Symbol(T91, Decl(conditionalTypes1.ts, 265, 40)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 266, 9)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 266, 9)) const f40 = (a: T90): T91 => a; ->f40 : Symbol(f40, Decl(conditionalTypes1.ts, 263, 5)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 263, 13)) ->a : Symbol(a, Decl(conditionalTypes1.ts, 263, 16)) ->T90 : Symbol(T90, Decl(conditionalTypes1.ts, 257, 1)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 263, 13)) ->T91 : Symbol(T91, Decl(conditionalTypes1.ts, 261, 40)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 263, 13)) ->a : Symbol(a, Decl(conditionalTypes1.ts, 263, 16)) +>f40 : Symbol(f40, Decl(conditionalTypes1.ts, 267, 5)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 267, 13)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 267, 16)) +>T90 : Symbol(T90, Decl(conditionalTypes1.ts, 261, 1)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 267, 13)) +>T91 : Symbol(T91, Decl(conditionalTypes1.ts, 265, 40)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 267, 13)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 267, 16)) const f41 = (a: T91): T90 => a; ->f41 : Symbol(f41, Decl(conditionalTypes1.ts, 264, 5)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 264, 13)) ->a : Symbol(a, Decl(conditionalTypes1.ts, 264, 16)) ->T91 : Symbol(T91, Decl(conditionalTypes1.ts, 261, 40)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 264, 13)) ->T90 : Symbol(T90, Decl(conditionalTypes1.ts, 257, 1)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 264, 13)) ->a : Symbol(a, Decl(conditionalTypes1.ts, 264, 16)) +>f41 : Symbol(f41, Decl(conditionalTypes1.ts, 268, 5)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 268, 13)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 268, 16)) +>T91 : Symbol(T91, Decl(conditionalTypes1.ts, 265, 40)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 268, 13)) +>T90 : Symbol(T90, Decl(conditionalTypes1.ts, 261, 1)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 268, 13)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 268, 16)) type T92 = T extends () => 0 ? () => 1 : () => 2; ->T92 : Symbol(T92, Decl(conditionalTypes1.ts, 264, 40)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 266, 9)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 266, 9)) +>T92 : Symbol(T92, Decl(conditionalTypes1.ts, 268, 40)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 270, 9)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 270, 9)) type T93 = T extends () => 0 ? () => 1 : () => 2; ->T93 : Symbol(T93, Decl(conditionalTypes1.ts, 266, 52)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 267, 9)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 267, 9)) +>T93 : Symbol(T93, Decl(conditionalTypes1.ts, 270, 52)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 271, 9)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 271, 9)) const f42 = (a: T92): T93 => a; ->f42 : Symbol(f42, Decl(conditionalTypes1.ts, 268, 5)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 268, 13)) ->a : Symbol(a, Decl(conditionalTypes1.ts, 268, 16)) ->T92 : Symbol(T92, Decl(conditionalTypes1.ts, 264, 40)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 268, 13)) ->T93 : Symbol(T93, Decl(conditionalTypes1.ts, 266, 52)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 268, 13)) ->a : Symbol(a, Decl(conditionalTypes1.ts, 268, 16)) +>f42 : Symbol(f42, Decl(conditionalTypes1.ts, 272, 5)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 272, 13)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 272, 16)) +>T92 : Symbol(T92, Decl(conditionalTypes1.ts, 268, 40)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 272, 13)) +>T93 : Symbol(T93, Decl(conditionalTypes1.ts, 270, 52)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 272, 13)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 272, 16)) const f43 = (a: T93): T92 => a; ->f43 : Symbol(f43, Decl(conditionalTypes1.ts, 269, 5)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 269, 13)) ->a : Symbol(a, Decl(conditionalTypes1.ts, 269, 16)) ->T93 : Symbol(T93, Decl(conditionalTypes1.ts, 266, 52)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 269, 13)) ->T92 : Symbol(T92, Decl(conditionalTypes1.ts, 264, 40)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 269, 13)) ->a : Symbol(a, Decl(conditionalTypes1.ts, 269, 16)) +>f43 : Symbol(f43, Decl(conditionalTypes1.ts, 273, 5)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 273, 13)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 273, 16)) +>T93 : Symbol(T93, Decl(conditionalTypes1.ts, 270, 52)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 273, 13)) +>T92 : Symbol(T92, Decl(conditionalTypes1.ts, 268, 40)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 273, 13)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 273, 16)) type T94 = T extends string ? true : 42; ->T94 : Symbol(T94, Decl(conditionalTypes1.ts, 269, 40)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 271, 9)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 271, 9)) +>T94 : Symbol(T94, Decl(conditionalTypes1.ts, 273, 40)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 275, 9)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 275, 9)) type T95 = T extends string ? boolean : number; ->T95 : Symbol(T95, Decl(conditionalTypes1.ts, 271, 43)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 272, 9)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 272, 9)) +>T95 : Symbol(T95, Decl(conditionalTypes1.ts, 275, 43)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 276, 9)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 276, 9)) const f44 = (value: T94): T95 => value; ->f44 : Symbol(f44, Decl(conditionalTypes1.ts, 273, 5)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 273, 13)) ->value : Symbol(value, Decl(conditionalTypes1.ts, 273, 16)) ->T94 : Symbol(T94, Decl(conditionalTypes1.ts, 269, 40)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 273, 13)) ->T95 : Symbol(T95, Decl(conditionalTypes1.ts, 271, 43)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 273, 13)) ->value : Symbol(value, Decl(conditionalTypes1.ts, 273, 16)) +>f44 : Symbol(f44, Decl(conditionalTypes1.ts, 277, 5)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 277, 13)) +>value : Symbol(value, Decl(conditionalTypes1.ts, 277, 16)) +>T94 : Symbol(T94, Decl(conditionalTypes1.ts, 273, 40)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 277, 13)) +>T95 : Symbol(T95, Decl(conditionalTypes1.ts, 275, 43)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 277, 13)) +>value : Symbol(value, Decl(conditionalTypes1.ts, 277, 16)) const f45 = (value: T95): T94 => value; // Error ->f45 : Symbol(f45, Decl(conditionalTypes1.ts, 274, 5)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 274, 13)) ->value : Symbol(value, Decl(conditionalTypes1.ts, 274, 16)) ->T95 : Symbol(T95, Decl(conditionalTypes1.ts, 271, 43)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 274, 13)) ->T94 : Symbol(T94, Decl(conditionalTypes1.ts, 269, 40)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 274, 13)) ->value : Symbol(value, Decl(conditionalTypes1.ts, 274, 16)) +>f45 : Symbol(f45, Decl(conditionalTypes1.ts, 278, 5)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 278, 13)) +>value : Symbol(value, Decl(conditionalTypes1.ts, 278, 16)) +>T95 : Symbol(T95, Decl(conditionalTypes1.ts, 275, 43)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 278, 13)) +>T94 : Symbol(T94, Decl(conditionalTypes1.ts, 273, 40)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 278, 13)) +>value : Symbol(value, Decl(conditionalTypes1.ts, 278, 16)) // Repro from #21863 function f50() { ->f50 : Symbol(f50, Decl(conditionalTypes1.ts, 274, 48)) +>f50 : Symbol(f50, Decl(conditionalTypes1.ts, 278, 48)) type Eq = T extends U ? U extends T ? true : false : false; ->Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 278, 16)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 279, 12)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 279, 14)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 279, 12)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 279, 14)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 279, 14)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 279, 12)) +>Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 282, 16)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 283, 12)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 283, 14)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 283, 12)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 283, 14)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 283, 14)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 283, 12)) type If = S extends false ? U : T; ->If : Symbol(If, Decl(conditionalTypes1.ts, 279, 69)) ->S : Symbol(S, Decl(conditionalTypes1.ts, 280, 12)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 280, 14)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 280, 17)) ->S : Symbol(S, Decl(conditionalTypes1.ts, 280, 12)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 280, 17)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 280, 14)) +>If : Symbol(If, Decl(conditionalTypes1.ts, 283, 69)) +>S : Symbol(S, Decl(conditionalTypes1.ts, 284, 12)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 284, 14)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 284, 17)) +>S : Symbol(S, Decl(conditionalTypes1.ts, 284, 12)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 284, 17)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 284, 14)) type Omit = { [P in keyof T]: If, never, P>; }[keyof T]; ->Omit : Symbol(Omit, Decl(conditionalTypes1.ts, 280, 47)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 281, 14)) ->P : Symbol(P, Decl(conditionalTypes1.ts, 281, 37)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 281, 14)) ->If : Symbol(If, Decl(conditionalTypes1.ts, 279, 69)) ->Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 278, 16)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 281, 14)) ->P : Symbol(P, Decl(conditionalTypes1.ts, 281, 37)) ->P : Symbol(P, Decl(conditionalTypes1.ts, 281, 37)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 281, 14)) +>Omit : Symbol(Omit, Decl(conditionalTypes1.ts, 284, 47)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 285, 14)) +>P : Symbol(P, Decl(conditionalTypes1.ts, 285, 37)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 285, 14)) +>If : Symbol(If, Decl(conditionalTypes1.ts, 283, 69)) +>Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 282, 16)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 285, 14)) +>P : Symbol(P, Decl(conditionalTypes1.ts, 285, 37)) +>P : Symbol(P, Decl(conditionalTypes1.ts, 285, 37)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 285, 14)) type Omit2 = { [P in keyof T]: If, never, P>; }[keyof T]; ->Omit2 : Symbol(Omit2, Decl(conditionalTypes1.ts, 281, 94)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 282, 15)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 282, 32)) ->P : Symbol(P, Decl(conditionalTypes1.ts, 282, 49)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 282, 15)) ->If : Symbol(If, Decl(conditionalTypes1.ts, 279, 69)) ->Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 278, 16)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 282, 15)) ->P : Symbol(P, Decl(conditionalTypes1.ts, 282, 49)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 282, 32)) ->P : Symbol(P, Decl(conditionalTypes1.ts, 282, 49)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 282, 15)) +>Omit2 : Symbol(Omit2, Decl(conditionalTypes1.ts, 285, 94)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 286, 15)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 286, 32)) +>P : Symbol(P, Decl(conditionalTypes1.ts, 286, 49)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 286, 15)) +>If : Symbol(If, Decl(conditionalTypes1.ts, 283, 69)) +>Eq : Symbol(Eq, Decl(conditionalTypes1.ts, 282, 16)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 286, 15)) +>P : Symbol(P, Decl(conditionalTypes1.ts, 286, 49)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 286, 32)) +>P : Symbol(P, Decl(conditionalTypes1.ts, 286, 49)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 286, 15)) type A = Omit<{ a: void; b: never; }>; // 'a' ->A : Symbol(A, Decl(conditionalTypes1.ts, 282, 102)) ->Omit : Symbol(Omit, Decl(conditionalTypes1.ts, 280, 47)) ->a : Symbol(a, Decl(conditionalTypes1.ts, 283, 19)) ->b : Symbol(b, Decl(conditionalTypes1.ts, 283, 28)) +>A : Symbol(A, Decl(conditionalTypes1.ts, 286, 102)) +>Omit : Symbol(Omit, Decl(conditionalTypes1.ts, 284, 47)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 287, 19)) +>b : Symbol(b, Decl(conditionalTypes1.ts, 287, 28)) type B = Omit2<{ a: void; b: never; }>; // 'a' ->B : Symbol(B, Decl(conditionalTypes1.ts, 283, 42)) ->Omit2 : Symbol(Omit2, Decl(conditionalTypes1.ts, 281, 94)) ->a : Symbol(a, Decl(conditionalTypes1.ts, 284, 20)) ->b : Symbol(b, Decl(conditionalTypes1.ts, 284, 29)) +>B : Symbol(B, Decl(conditionalTypes1.ts, 287, 42)) +>Omit2 : Symbol(Omit2, Decl(conditionalTypes1.ts, 285, 94)) +>a : Symbol(a, Decl(conditionalTypes1.ts, 288, 20)) +>b : Symbol(b, Decl(conditionalTypes1.ts, 288, 29)) } // Repro from #21862 type OldDiff = ( ->OldDiff : Symbol(OldDiff, Decl(conditionalTypes1.ts, 285, 1)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 289, 13)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 289, 30)) +>OldDiff : Symbol(OldDiff, Decl(conditionalTypes1.ts, 289, 1)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 293, 13)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 293, 30)) & { [P in T]: P; } ->P : Symbol(P, Decl(conditionalTypes1.ts, 290, 9)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 289, 13)) ->P : Symbol(P, Decl(conditionalTypes1.ts, 290, 9)) +>P : Symbol(P, Decl(conditionalTypes1.ts, 294, 9)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 293, 13)) +>P : Symbol(P, Decl(conditionalTypes1.ts, 294, 9)) & { [P in U]: never; } ->P : Symbol(P, Decl(conditionalTypes1.ts, 291, 9)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 289, 30)) +>P : Symbol(P, Decl(conditionalTypes1.ts, 295, 9)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 293, 30)) & { [x: string]: never; } ->x : Symbol(x, Decl(conditionalTypes1.ts, 292, 9)) +>x : Symbol(x, Decl(conditionalTypes1.ts, 296, 9)) )[T]; ->T : Symbol(T, Decl(conditionalTypes1.ts, 289, 13)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 293, 13)) type NewDiff = T extends U ? never : T; ->NewDiff : Symbol(NewDiff, Decl(conditionalTypes1.ts, 293, 5)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 294, 13)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 294, 15)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 294, 13)) ->U : Symbol(U, Decl(conditionalTypes1.ts, 294, 15)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 294, 13)) +>NewDiff : Symbol(NewDiff, Decl(conditionalTypes1.ts, 297, 5)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 298, 13)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 298, 15)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 298, 13)) +>U : Symbol(U, Decl(conditionalTypes1.ts, 298, 15)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 298, 13)) interface A { ->A : Symbol(A, Decl(conditionalTypes1.ts, 294, 45)) +>A : Symbol(A, Decl(conditionalTypes1.ts, 298, 45)) a: 'a'; ->a : Symbol(A.a, Decl(conditionalTypes1.ts, 295, 13)) +>a : Symbol(A.a, Decl(conditionalTypes1.ts, 299, 13)) } interface B1 extends A { ->B1 : Symbol(B1, Decl(conditionalTypes1.ts, 297, 1)) ->A : Symbol(A, Decl(conditionalTypes1.ts, 294, 45)) +>B1 : Symbol(B1, Decl(conditionalTypes1.ts, 301, 1)) +>A : Symbol(A, Decl(conditionalTypes1.ts, 298, 45)) b: 'b'; ->b : Symbol(B1.b, Decl(conditionalTypes1.ts, 298, 24)) +>b : Symbol(B1.b, Decl(conditionalTypes1.ts, 302, 24)) c: OldDiff; ->c : Symbol(B1.c, Decl(conditionalTypes1.ts, 299, 11)) ->OldDiff : Symbol(OldDiff, Decl(conditionalTypes1.ts, 285, 1)) ->A : Symbol(A, Decl(conditionalTypes1.ts, 294, 45)) +>c : Symbol(B1.c, Decl(conditionalTypes1.ts, 303, 11)) +>OldDiff : Symbol(OldDiff, Decl(conditionalTypes1.ts, 289, 1)) +>A : Symbol(A, Decl(conditionalTypes1.ts, 298, 45)) } interface B2 extends A { ->B2 : Symbol(B2, Decl(conditionalTypes1.ts, 301, 1)) ->A : Symbol(A, Decl(conditionalTypes1.ts, 294, 45)) +>B2 : Symbol(B2, Decl(conditionalTypes1.ts, 305, 1)) +>A : Symbol(A, Decl(conditionalTypes1.ts, 298, 45)) b: 'b'; ->b : Symbol(B2.b, Decl(conditionalTypes1.ts, 302, 24)) +>b : Symbol(B2.b, Decl(conditionalTypes1.ts, 306, 24)) c: NewDiff; ->c : Symbol(B2.c, Decl(conditionalTypes1.ts, 303, 11)) ->NewDiff : Symbol(NewDiff, Decl(conditionalTypes1.ts, 293, 5)) ->A : Symbol(A, Decl(conditionalTypes1.ts, 294, 45)) +>c : Symbol(B2.c, Decl(conditionalTypes1.ts, 307, 11)) +>NewDiff : Symbol(NewDiff, Decl(conditionalTypes1.ts, 297, 5)) +>A : Symbol(A, Decl(conditionalTypes1.ts, 298, 45)) } type c1 = B1['c']; // 'c' | 'b' ->c1 : Symbol(c1, Decl(conditionalTypes1.ts, 305, 1)) ->B1 : Symbol(B1, Decl(conditionalTypes1.ts, 297, 1)) +>c1 : Symbol(c1, Decl(conditionalTypes1.ts, 309, 1)) +>B1 : Symbol(B1, Decl(conditionalTypes1.ts, 301, 1)) type c2 = B2['c']; // 'c' | 'b' ->c2 : Symbol(c2, Decl(conditionalTypes1.ts, 306, 18)) ->B2 : Symbol(B2, Decl(conditionalTypes1.ts, 301, 1)) +>c2 : Symbol(c2, Decl(conditionalTypes1.ts, 310, 18)) +>B2 : Symbol(B2, Decl(conditionalTypes1.ts, 305, 1)) // Repro from #21929 type NonFooKeys1 = OldDiff; ->NonFooKeys1 : Symbol(NonFooKeys1, Decl(conditionalTypes1.ts, 307, 18)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 311, 17)) ->OldDiff : Symbol(OldDiff, Decl(conditionalTypes1.ts, 285, 1)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 311, 17)) +>NonFooKeys1 : Symbol(NonFooKeys1, Decl(conditionalTypes1.ts, 311, 18)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 315, 17)) +>OldDiff : Symbol(OldDiff, Decl(conditionalTypes1.ts, 289, 1)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 315, 17)) type NonFooKeys2 = Exclude; ->NonFooKeys2 : Symbol(NonFooKeys2, Decl(conditionalTypes1.ts, 311, 61)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 312, 17)) +>NonFooKeys2 : Symbol(NonFooKeys2, Decl(conditionalTypes1.ts, 315, 61)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 316, 17)) >Exclude : Symbol(Exclude, Decl(lib.d.ts, --, --)) ->T : Symbol(T, Decl(conditionalTypes1.ts, 312, 17)) +>T : Symbol(T, Decl(conditionalTypes1.ts, 316, 17)) type Test1 = NonFooKeys1<{foo: 1, bar: 2, baz: 3}>; // "bar" | "baz" ->Test1 : Symbol(Test1, Decl(conditionalTypes1.ts, 312, 61)) ->NonFooKeys1 : Symbol(NonFooKeys1, Decl(conditionalTypes1.ts, 307, 18)) ->foo : Symbol(foo, Decl(conditionalTypes1.ts, 314, 26)) ->bar : Symbol(bar, Decl(conditionalTypes1.ts, 314, 33)) ->baz : Symbol(baz, Decl(conditionalTypes1.ts, 314, 41)) +>Test1 : Symbol(Test1, Decl(conditionalTypes1.ts, 316, 61)) +>NonFooKeys1 : Symbol(NonFooKeys1, Decl(conditionalTypes1.ts, 311, 18)) +>foo : Symbol(foo, Decl(conditionalTypes1.ts, 318, 26)) +>bar : Symbol(bar, Decl(conditionalTypes1.ts, 318, 33)) +>baz : Symbol(baz, Decl(conditionalTypes1.ts, 318, 41)) type Test2 = NonFooKeys2<{foo: 1, bar: 2, baz: 3}>; // "bar" | "baz" ->Test2 : Symbol(Test2, Decl(conditionalTypes1.ts, 314, 51)) ->NonFooKeys2 : Symbol(NonFooKeys2, Decl(conditionalTypes1.ts, 311, 61)) ->foo : Symbol(foo, Decl(conditionalTypes1.ts, 315, 26)) ->bar : Symbol(bar, Decl(conditionalTypes1.ts, 315, 33)) ->baz : Symbol(baz, Decl(conditionalTypes1.ts, 315, 41)) +>Test2 : Symbol(Test2, Decl(conditionalTypes1.ts, 318, 51)) +>NonFooKeys2 : Symbol(NonFooKeys2, Decl(conditionalTypes1.ts, 315, 61)) +>foo : Symbol(foo, Decl(conditionalTypes1.ts, 319, 26)) +>bar : Symbol(bar, Decl(conditionalTypes1.ts, 319, 33)) +>baz : Symbol(baz, Decl(conditionalTypes1.ts, 319, 41)) + +// Repro from #21729 + +interface Foo2 { foo: string; } +>Foo2 : Symbol(Foo2, Decl(conditionalTypes1.ts, 319, 51)) +>foo : Symbol(Foo2.foo, Decl(conditionalTypes1.ts, 323, 16)) + +interface Bar2 { bar: string; } +>Bar2 : Symbol(Bar2, Decl(conditionalTypes1.ts, 323, 31)) +>bar : Symbol(Bar2.bar, Decl(conditionalTypes1.ts, 324, 16)) + +type FooBar = Foo2 | Bar2; +>FooBar : Symbol(FooBar, Decl(conditionalTypes1.ts, 324, 31)) +>Foo2 : Symbol(Foo2, Decl(conditionalTypes1.ts, 319, 51)) +>Bar2 : Symbol(Bar2, Decl(conditionalTypes1.ts, 323, 31)) + +declare interface ExtractFooBar { } +>ExtractFooBar : Symbol(ExtractFooBar, Decl(conditionalTypes1.ts, 325, 26)) +>FB : Symbol(FB, Decl(conditionalTypes1.ts, 326, 32)) +>FooBar : Symbol(FooBar, Decl(conditionalTypes1.ts, 324, 31)) + +type Extracted = { +>Extracted : Symbol(Extracted, Decl(conditionalTypes1.ts, 326, 54)) +>Struct : Symbol(Struct, Decl(conditionalTypes1.ts, 328, 15)) + + [K in keyof Struct]: Struct[K] extends FooBar ? ExtractFooBar : Struct[K]; +>K : Symbol(K, Decl(conditionalTypes1.ts, 329, 5)) +>Struct : Symbol(Struct, Decl(conditionalTypes1.ts, 328, 15)) +>Struct : Symbol(Struct, Decl(conditionalTypes1.ts, 328, 15)) +>K : Symbol(K, Decl(conditionalTypes1.ts, 329, 5)) +>FooBar : Symbol(FooBar, Decl(conditionalTypes1.ts, 324, 31)) +>ExtractFooBar : Symbol(ExtractFooBar, Decl(conditionalTypes1.ts, 325, 26)) +>Struct : Symbol(Struct, Decl(conditionalTypes1.ts, 328, 15)) +>K : Symbol(K, Decl(conditionalTypes1.ts, 329, 5)) +>Struct : Symbol(Struct, Decl(conditionalTypes1.ts, 328, 15)) +>K : Symbol(K, Decl(conditionalTypes1.ts, 329, 5)) +} diff --git a/tests/baselines/reference/conditionalTypes1.types b/tests/baselines/reference/conditionalTypes1.types index 17c4e7ac5e9..f777bad8482 100644 --- a/tests/baselines/reference/conditionalTypes1.types +++ b/tests/baselines/reference/conditionalTypes1.types @@ -678,6 +678,33 @@ function f21(x: T, y: ZeroOf) { >x : T } +type T35 = T[]; +>T35 : T[] +>T : T +>a : string +>b : number +>T : T + +type T36 = T extends { a: string } ? T extends { b: number } ? T35 : never : never; +>T36 : T36 +>T : T +>T : T +>a : string +>T : T +>b : number +>T35 : T[] +>T : T + +type T37 = T extends { b: number } ? T extends { a: string } ? T35 : never : never; +>T37 : T37 +>T : T +>T : T +>b : number +>T : T +>a : string +>T35 : T[] +>T : T + type Extends = T extends U ? true : false; >Extends : Extends >T : T @@ -1370,3 +1397,40 @@ type Test2 = NonFooKeys2<{foo: 1, bar: 2, baz: 3}>; // "bar" | "baz" >bar : 2 >baz : 3 +// Repro from #21729 + +interface Foo2 { foo: string; } +>Foo2 : Foo2 +>foo : string + +interface Bar2 { bar: string; } +>Bar2 : Bar2 +>bar : string + +type FooBar = Foo2 | Bar2; +>FooBar : FooBar +>Foo2 : Foo2 +>Bar2 : Bar2 + +declare interface ExtractFooBar { } +>ExtractFooBar : ExtractFooBar +>FB : FB +>FooBar : FooBar + +type Extracted = { +>Extracted : Extracted +>Struct : Struct + + [K in keyof Struct]: Struct[K] extends FooBar ? ExtractFooBar : Struct[K]; +>K : K +>Struct : Struct +>Struct : Struct +>K : K +>FooBar : FooBar +>ExtractFooBar : ExtractFooBar +>Struct : Struct +>K : K +>Struct : Struct +>K : K +} +