diff --git a/tests/baselines/reference/keyofAndIndexedAccess.js b/tests/baselines/reference/keyofAndIndexedAccess.js index 873fa2a035..54a1e646bb 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.js +++ b/tests/baselines/reference/keyofAndIndexedAccess.js @@ -300,23 +300,16 @@ type S2 = { b: string; }; -function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K], x4: T[K]) { +function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]) { x1 = x2; x1 = x3; - x1 = x4; x2 = x1; x2 = x3; - x2 = x4; x3 = x1; x3 = x2; - x3 = x4; - x4 = x1; - x4 = x2; - x4 = x3; x1.length; x2.length; x3.length; - x4.length; } function f91(x: T, y: T[keyof T], z: T[K]) { @@ -886,23 +879,16 @@ var C1 = /** @class */ (function () { }; return C1; }()); -function f90(x1, x2, x3, x4) { +function f90(x1, x2, x3) { x1 = x2; x1 = x3; - x1 = x4; x2 = x1; x2 = x3; - x2 = x4; x3 = x1; x3 = x2; - x3 = x4; - x4 = x1; - x4 = x2; - x4 = x3; x1.length; x2.length; x3.length; - x4.length; } function f91(x, y, z) { var a; @@ -1240,7 +1226,7 @@ declare type S2 = { a: string; b: string; }; -declare function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K], x4: T[K]): void; +declare function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]): void; declare function f91(x: T, y: T[keyof T], z: T[K]): void; declare function f92(x: T, y: T[keyof T], z: T[K]): void; declare class Base { diff --git a/tests/baselines/reference/keyofAndIndexedAccess.symbols b/tests/baselines/reference/keyofAndIndexedAccess.symbols index 15cc704c48..d69da8b8ed 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.symbols +++ b/tests/baselines/reference/keyofAndIndexedAccess.symbols @@ -1151,7 +1151,7 @@ type S2 = { }; -function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K], x4: T[K]) { +function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]) { >f90 : Symbol(f90, Decl(keyofAndIndexedAccess.ts, 299, 2)) >T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 301, 13)) >S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 294, 1)) @@ -1165,9 +1165,6 @@ function f90(x1: S2[keyof S2], x2: T[keyof S2] >S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 294, 1)) >x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) >S2 : Symbol(S2, Decl(keyofAndIndexedAccess.ts, 294, 1)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 301, 26)) ->x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 301, 92)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 301, 13)) >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 301, 26)) x1 = x2; @@ -1178,10 +1175,6 @@ function f90(x1: S2[keyof S2], x2: T[keyof S2] >x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 301, 47)) >x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) - x1 = x4; ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 301, 47)) ->x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 301, 92)) - x2 = x1; >x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 301, 64)) >x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 301, 47)) @@ -1190,10 +1183,6 @@ function f90(x1: S2[keyof S2], x2: T[keyof S2] >x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 301, 64)) >x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) - x2 = x4; ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 301, 64)) ->x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 301, 92)) - x3 = x1; >x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) >x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 301, 47)) @@ -1202,22 +1191,6 @@ function f90(x1: S2[keyof S2], x2: T[keyof S2] >x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) >x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 301, 64)) - x3 = x4; ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) ->x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 301, 92)) - - x4 = x1; ->x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 301, 92)) ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 301, 47)) - - x4 = x2; ->x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 301, 92)) ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 301, 64)) - - x4 = x3; ->x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 301, 92)) ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) - x1.length; >x1.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) >x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 301, 47)) @@ -1231,1141 +1204,1136 @@ function f90(x1: S2[keyof S2], x2: T[keyof S2] x3.length; >x3.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) >x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 301, 81)) ->length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) - - x4.length; ->x4.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) ->x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 301, 92)) >length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) } function f91(x: T, y: T[keyof T], z: T[K]) { ->f91 : Symbol(f91, Decl(keyofAndIndexedAccess.ts, 318, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 320, 15)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 320, 35)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 320, 40)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) ->z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 320, 55)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 320, 15)) +>f91 : Symbol(f91, Decl(keyofAndIndexedAccess.ts, 311, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 313, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 313, 15)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 313, 13)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 313, 35)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 313, 13)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 313, 40)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 313, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 313, 13)) +>z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 313, 55)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 313, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 313, 15)) let a: {}; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 321, 7)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 314, 7)) a = x; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 321, 7)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 320, 35)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 314, 7)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 313, 35)) a = y; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 321, 7)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 320, 40)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 314, 7)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 313, 40)) a = z; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 321, 7)) ->z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 320, 55)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 314, 7)) +>z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 313, 55)) } function f92(x: T, y: T[keyof T], z: T[K]) { ->f92 : Symbol(f92, Decl(keyofAndIndexedAccess.ts, 325, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 327, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 327, 15)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 327, 13)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 327, 35)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 327, 13)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 327, 40)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 327, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 327, 13)) ->z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 327, 55)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 327, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 327, 15)) +>f92 : Symbol(f92, Decl(keyofAndIndexedAccess.ts, 318, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 320, 15)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 320, 35)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 320, 40)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) +>z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 320, 55)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 320, 15)) let a: {} | null | undefined; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 328, 7)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 321, 7)) a = x; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 328, 7)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 327, 35)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 321, 7)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 320, 35)) a = y; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 328, 7)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 327, 40)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 321, 7)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 320, 40)) a = z; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 328, 7)) ->z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 327, 55)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 321, 7)) +>z : Symbol(z, Decl(keyofAndIndexedAccess.ts, 320, 55)) } // Repros from #12011 class Base { ->Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 332, 1)) +>Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 325, 1)) get(prop: K) { ->get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 336, 12)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 337, 8)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 337, 30)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 337, 8)) +>get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 329, 12)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 330, 8)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 330, 30)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 330, 8)) return this[prop]; ->this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 332, 1)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 337, 30)) +>this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 325, 1)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 330, 30)) } set(prop: K, value: this[K]) { ->set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 339, 5)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 340, 8)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 340, 30)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 340, 8)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 340, 38)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 340, 8)) +>set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 332, 5)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 333, 8)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 333, 30)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 333, 8)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 333, 38)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 333, 8)) this[prop] = value; ->this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 332, 1)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 340, 30)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 340, 38)) +>this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 325, 1)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 333, 30)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 333, 38)) } } class Person extends Base { ->Person : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 343, 1)) ->Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 332, 1)) +>Person : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 336, 1)) +>Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 325, 1)) parts: number; ->parts : Symbol(Person.parts, Decl(keyofAndIndexedAccess.ts, 345, 27)) +>parts : Symbol(Person.parts, Decl(keyofAndIndexedAccess.ts, 338, 27)) constructor(parts: number) { ->parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 347, 16)) +>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 340, 16)) super(); ->super : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 332, 1)) +>super : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 325, 1)) this.set("parts", parts); ->this.set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 339, 5)) ->this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 343, 1)) ->set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 339, 5)) ->parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 347, 16)) +>this.set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 332, 5)) +>this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 336, 1)) +>set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 332, 5)) +>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 340, 16)) } getParts() { ->getParts : Symbol(Person.getParts, Decl(keyofAndIndexedAccess.ts, 350, 5)) +>getParts : Symbol(Person.getParts, Decl(keyofAndIndexedAccess.ts, 343, 5)) return this.get("parts") ->this.get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 336, 12)) ->this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 343, 1)) ->get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 336, 12)) +>this.get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 329, 12)) +>this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 336, 1)) +>get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 329, 12)) } } class OtherPerson { ->OtherPerson : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 354, 1)) +>OtherPerson : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 347, 1)) parts: number; ->parts : Symbol(OtherPerson.parts, Decl(keyofAndIndexedAccess.ts, 356, 19)) +>parts : Symbol(OtherPerson.parts, Decl(keyofAndIndexedAccess.ts, 349, 19)) constructor(parts: number) { ->parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 358, 16)) +>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 351, 16)) setProperty(this, "parts", parts); >setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 80, 1)) ->this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 354, 1)) ->parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 358, 16)) +>this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 347, 1)) +>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 351, 16)) } getParts() { ->getParts : Symbol(OtherPerson.getParts, Decl(keyofAndIndexedAccess.ts, 360, 5)) +>getParts : Symbol(OtherPerson.getParts, Decl(keyofAndIndexedAccess.ts, 353, 5)) return getProperty(this, "parts") >getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 76, 26)) ->this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 354, 1)) +>this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 347, 1)) } } // Modified repro from #12544 function path(obj: T, key1: K1): T[K1]; ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 364, 1), Decl(keyofAndIndexedAccess.ts, 368, 62), Decl(keyofAndIndexedAccess.ts, 369, 100), Decl(keyofAndIndexedAccess.ts, 370, 142), Decl(keyofAndIndexedAccess.ts, 371, 59)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 368, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 368, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 368, 14)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 368, 37)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 368, 14)) ->key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 368, 44)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 368, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 368, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 368, 16)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 361, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 361, 37)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) +>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 361, 44)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 361, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 361, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 361, 16)) function path(obj: T, key1: K1, key2: K2): T[K1][K2]; ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 364, 1), Decl(keyofAndIndexedAccess.ts, 368, 62), Decl(keyofAndIndexedAccess.ts, 369, 100), Decl(keyofAndIndexedAccess.ts, 370, 142), Decl(keyofAndIndexedAccess.ts, 371, 59)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 369, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 369, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 369, 14)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 369, 36)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 369, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 369, 16)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 369, 61)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 369, 14)) ->key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 369, 68)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 369, 16)) ->key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 369, 78)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 369, 36)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 369, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 369, 16)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 369, 36)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 362, 36)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 362, 61)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) +>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 362, 68)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) +>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 362, 78)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 362, 36)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 362, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 362, 16)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 362, 36)) function path(obj: T, key1: K1, key2: K2, key3: K3): T[K1][K2][K3]; ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 364, 1), Decl(keyofAndIndexedAccess.ts, 368, 62), Decl(keyofAndIndexedAccess.ts, 369, 100), Decl(keyofAndIndexedAccess.ts, 370, 142), Decl(keyofAndIndexedAccess.ts, 371, 59)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 370, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 370, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 370, 14)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 370, 36)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 370, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 370, 16)) ->K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 370, 60)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 370, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 370, 16)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 370, 36)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 370, 89)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 370, 14)) ->key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 370, 96)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 370, 16)) ->key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 370, 106)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 370, 36)) ->key3 : Symbol(key3, Decl(keyofAndIndexedAccess.ts, 370, 116)) ->K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 370, 60)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 370, 14)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 370, 16)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 370, 36)) ->K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 370, 60)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 363, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 363, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 363, 14)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 363, 36)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 363, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 363, 16)) +>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 363, 60)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 363, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 363, 16)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 363, 36)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 363, 89)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 363, 14)) +>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 363, 96)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 363, 16)) +>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 363, 106)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 363, 36)) +>key3 : Symbol(key3, Decl(keyofAndIndexedAccess.ts, 363, 116)) +>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 363, 60)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 363, 14)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 363, 16)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 363, 36)) +>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 363, 60)) function path(obj: any, ...keys: (string | number)[]): any; ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 364, 1), Decl(keyofAndIndexedAccess.ts, 368, 62), Decl(keyofAndIndexedAccess.ts, 369, 100), Decl(keyofAndIndexedAccess.ts, 370, 142), Decl(keyofAndIndexedAccess.ts, 371, 59)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 371, 14)) ->keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 371, 23)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 364, 14)) +>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 364, 23)) function path(obj: any, ...keys: (string | number)[]): any { ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 364, 1), Decl(keyofAndIndexedAccess.ts, 368, 62), Decl(keyofAndIndexedAccess.ts, 369, 100), Decl(keyofAndIndexedAccess.ts, 370, 142), Decl(keyofAndIndexedAccess.ts, 371, 59)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 372, 14)) ->keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 372, 23)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 365, 14)) +>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 365, 23)) let result = obj; ->result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 373, 7)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 372, 14)) +>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 366, 7)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 365, 14)) for (let k of keys) { ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 374, 12)) ->keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 372, 23)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 367, 12)) +>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 365, 23)) result = result[k]; ->result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 373, 7)) ->result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 373, 7)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 374, 12)) +>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 366, 7)) +>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 366, 7)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 367, 12)) } return result; ->result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 373, 7)) +>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 366, 7)) } type Thing = { ->Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 378, 1)) +>Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 371, 1)) a: { x: number, y: string }, ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 380, 14)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 381, 8)) ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 381, 19)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 373, 14)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 374, 8)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 374, 19)) b: boolean ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 381, 32)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 374, 32)) }; function f1(thing: Thing) { ->f1 : Symbol(f1, Decl(keyofAndIndexedAccess.ts, 383, 2)) ->thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 386, 12)) ->Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 378, 1)) +>f1 : Symbol(f1, Decl(keyofAndIndexedAccess.ts, 376, 2)) +>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 379, 12)) +>Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 371, 1)) let x1 = path(thing, 'a'); // { x: number, y: string } ->x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 387, 7)) ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 364, 1), Decl(keyofAndIndexedAccess.ts, 368, 62), Decl(keyofAndIndexedAccess.ts, 369, 100), Decl(keyofAndIndexedAccess.ts, 370, 142), Decl(keyofAndIndexedAccess.ts, 371, 59)) ->thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 386, 12)) +>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 380, 7)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) +>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 379, 12)) let x2 = path(thing, 'a', 'y'); // string ->x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 388, 7)) ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 364, 1), Decl(keyofAndIndexedAccess.ts, 368, 62), Decl(keyofAndIndexedAccess.ts, 369, 100), Decl(keyofAndIndexedAccess.ts, 370, 142), Decl(keyofAndIndexedAccess.ts, 371, 59)) ->thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 386, 12)) +>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 381, 7)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) +>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 379, 12)) let x3 = path(thing, 'b'); // boolean ->x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 389, 7)) ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 364, 1), Decl(keyofAndIndexedAccess.ts, 368, 62), Decl(keyofAndIndexedAccess.ts, 369, 100), Decl(keyofAndIndexedAccess.ts, 370, 142), Decl(keyofAndIndexedAccess.ts, 371, 59)) ->thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 386, 12)) +>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 382, 7)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) +>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 379, 12)) let x4 = path(thing, ...['a', 'x']); // any ->x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 390, 7)) ->path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 364, 1), Decl(keyofAndIndexedAccess.ts, 368, 62), Decl(keyofAndIndexedAccess.ts, 369, 100), Decl(keyofAndIndexedAccess.ts, 370, 142), Decl(keyofAndIndexedAccess.ts, 371, 59)) ->thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 386, 12)) +>x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 383, 7)) +>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 357, 1), Decl(keyofAndIndexedAccess.ts, 361, 62), Decl(keyofAndIndexedAccess.ts, 362, 100), Decl(keyofAndIndexedAccess.ts, 363, 142), Decl(keyofAndIndexedAccess.ts, 364, 59)) +>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 379, 12)) } // Repro from comment in #12114 const assignTo2 = (object: T, key1: K1, key2: K2) => ->assignTo2 : Symbol(assignTo2, Decl(keyofAndIndexedAccess.ts, 395, 5)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 395, 19)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 395, 21)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 395, 19)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 395, 41)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 395, 19)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 395, 21)) ->object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 395, 66)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 395, 19)) ->key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 395, 76)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 395, 21)) ->key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 395, 86)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 395, 41)) +>assignTo2 : Symbol(assignTo2, Decl(keyofAndIndexedAccess.ts, 388, 5)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 388, 19)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 388, 21)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 388, 19)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 388, 41)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 388, 19)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 388, 21)) +>object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 388, 66)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 388, 19)) +>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 388, 76)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 388, 21)) +>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 388, 86)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 388, 41)) (value: T[K1][K2]) => object[key1][key2] = value; ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 396, 5)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 395, 19)) ->K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 395, 21)) ->K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 395, 41)) ->object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 395, 66)) ->key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 395, 76)) ->key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 395, 86)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 396, 5)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 389, 5)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 388, 19)) +>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 388, 21)) +>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 388, 41)) +>object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 388, 66)) +>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 388, 76)) +>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 388, 86)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 389, 5)) // Modified repro from #12573 declare function one(handler: (t: T) => void): T ->one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 396, 53)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 400, 21)) ->handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 400, 24)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 400, 34)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 400, 21)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 400, 21)) +>one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 389, 53)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 393, 21)) +>handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 393, 24)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 393, 34)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 393, 21)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 393, 21)) var empty = one(() => {}) // inferred as {}, expected ->empty : Symbol(empty, Decl(keyofAndIndexedAccess.ts, 401, 3)) ->one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 396, 53)) +>empty : Symbol(empty, Decl(keyofAndIndexedAccess.ts, 394, 3)) +>one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 389, 53)) type Handlers = { [K in keyof T]: (t: T[K]) => void } ->Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 401, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 403, 14)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 403, 22)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 403, 14)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 403, 38)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 403, 14)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 403, 22)) +>Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 394, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 396, 14)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 396, 22)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 396, 14)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 396, 38)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 396, 14)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 396, 22)) declare function on(handlerHash: Handlers): T ->on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 403, 56)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 404, 20)) ->handlerHash : Symbol(handlerHash, Decl(keyofAndIndexedAccess.ts, 404, 23)) ->Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 401, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 404, 20)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 404, 20)) +>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 396, 56)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 397, 20)) +>handlerHash : Symbol(handlerHash, Decl(keyofAndIndexedAccess.ts, 397, 23)) +>Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 394, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 397, 20)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 397, 20)) var hashOfEmpty1 = on({ test: () => {} }); // {} ->hashOfEmpty1 : Symbol(hashOfEmpty1, Decl(keyofAndIndexedAccess.ts, 405, 3)) ->on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 403, 56)) ->test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 405, 23)) +>hashOfEmpty1 : Symbol(hashOfEmpty1, Decl(keyofAndIndexedAccess.ts, 398, 3)) +>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 396, 56)) +>test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 398, 23)) var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean } ->hashOfEmpty2 : Symbol(hashOfEmpty2, Decl(keyofAndIndexedAccess.ts, 406, 3)) ->on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 403, 56)) ->test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 406, 23)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 406, 31)) +>hashOfEmpty2 : Symbol(hashOfEmpty2, Decl(keyofAndIndexedAccess.ts, 399, 3)) +>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 396, 56)) +>test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 399, 23)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 399, 31)) // Repro from #12624 interface Options1 { ->Options1 : Symbol(Options1, Decl(keyofAndIndexedAccess.ts, 406, 52)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 410, 19)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 410, 24)) +>Options1 : Symbol(Options1, Decl(keyofAndIndexedAccess.ts, 399, 52)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 403, 19)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 403, 24)) data?: Data ->data : Symbol(Options1.data, Decl(keyofAndIndexedAccess.ts, 410, 36)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 410, 19)) +>data : Symbol(Options1.data, Decl(keyofAndIndexedAccess.ts, 403, 36)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 403, 19)) computed?: Computed; ->computed : Symbol(Options1.computed, Decl(keyofAndIndexedAccess.ts, 411, 15)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 410, 24)) +>computed : Symbol(Options1.computed, Decl(keyofAndIndexedAccess.ts, 404, 15)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 403, 24)) } declare class Component1 { ->Component1 : Symbol(Component1, Decl(keyofAndIndexedAccess.ts, 413, 1)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 415, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 415, 30)) +>Component1 : Symbol(Component1, Decl(keyofAndIndexedAccess.ts, 406, 1)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 408, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 408, 30)) constructor(options: Options1); ->options : Symbol(options, Decl(keyofAndIndexedAccess.ts, 416, 16)) ->Options1 : Symbol(Options1, Decl(keyofAndIndexedAccess.ts, 406, 52)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 415, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 415, 30)) +>options : Symbol(options, Decl(keyofAndIndexedAccess.ts, 409, 16)) +>Options1 : Symbol(Options1, Decl(keyofAndIndexedAccess.ts, 399, 52)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 408, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 408, 30)) get(key: K): (Data & Computed)[K]; ->get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 416, 51)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 417, 8)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 415, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 415, 30)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 417, 43)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 417, 8)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 415, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 415, 30)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 417, 8)) +>get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 409, 51)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 410, 8)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 408, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 408, 30)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 410, 43)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 410, 8)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 408, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 408, 30)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 410, 8)) } let c1 = new Component1({ ->c1 : Symbol(c1, Decl(keyofAndIndexedAccess.ts, 420, 3)) ->Component1 : Symbol(Component1, Decl(keyofAndIndexedAccess.ts, 413, 1)) +>c1 : Symbol(c1, Decl(keyofAndIndexedAccess.ts, 413, 3)) +>Component1 : Symbol(Component1, Decl(keyofAndIndexedAccess.ts, 406, 1)) data: { ->data : Symbol(data, Decl(keyofAndIndexedAccess.ts, 420, 25)) +>data : Symbol(data, Decl(keyofAndIndexedAccess.ts, 413, 25)) hello: "" ->hello : Symbol(hello, Decl(keyofAndIndexedAccess.ts, 421, 11)) +>hello : Symbol(hello, Decl(keyofAndIndexedAccess.ts, 414, 11)) } }); c1.get("hello"); ->c1.get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 416, 51)) ->c1 : Symbol(c1, Decl(keyofAndIndexedAccess.ts, 420, 3)) ->get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 416, 51)) +>c1.get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 409, 51)) +>c1 : Symbol(c1, Decl(keyofAndIndexedAccess.ts, 413, 3)) +>get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 409, 51)) // Repro from #12625 interface Options2 { ->Options2 : Symbol(Options2, Decl(keyofAndIndexedAccess.ts, 426, 16)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 430, 19)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 430, 24)) +>Options2 : Symbol(Options2, Decl(keyofAndIndexedAccess.ts, 419, 16)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 423, 19)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 423, 24)) data?: Data ->data : Symbol(Options2.data, Decl(keyofAndIndexedAccess.ts, 430, 36)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 430, 19)) +>data : Symbol(Options2.data, Decl(keyofAndIndexedAccess.ts, 423, 36)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 423, 19)) computed?: Computed; ->computed : Symbol(Options2.computed, Decl(keyofAndIndexedAccess.ts, 431, 15)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 430, 24)) +>computed : Symbol(Options2.computed, Decl(keyofAndIndexedAccess.ts, 424, 15)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 423, 24)) } declare class Component2 { ->Component2 : Symbol(Component2, Decl(keyofAndIndexedAccess.ts, 433, 1)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 435, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 435, 30)) +>Component2 : Symbol(Component2, Decl(keyofAndIndexedAccess.ts, 426, 1)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 428, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 428, 30)) constructor(options: Options2); ->options : Symbol(options, Decl(keyofAndIndexedAccess.ts, 436, 16)) ->Options2 : Symbol(Options2, Decl(keyofAndIndexedAccess.ts, 426, 16)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 435, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 435, 30)) +>options : Symbol(options, Decl(keyofAndIndexedAccess.ts, 429, 16)) +>Options2 : Symbol(Options2, Decl(keyofAndIndexedAccess.ts, 419, 16)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 428, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 428, 30)) get(key: K): (Data & Computed)[K]; ->get : Symbol(Component2.get, Decl(keyofAndIndexedAccess.ts, 436, 51)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 437, 8)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 435, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 435, 30)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 437, 47)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 437, 8)) ->Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 435, 25)) ->Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 435, 30)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 437, 8)) +>get : Symbol(Component2.get, Decl(keyofAndIndexedAccess.ts, 429, 51)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 430, 8)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 428, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 428, 30)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 430, 47)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 430, 8)) +>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 428, 25)) +>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 428, 30)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 430, 8)) } // Repro from #12641 interface R { ->R : Symbol(R, Decl(keyofAndIndexedAccess.ts, 438, 1)) +>R : Symbol(R, Decl(keyofAndIndexedAccess.ts, 431, 1)) p: number; ->p : Symbol(R.p, Decl(keyofAndIndexedAccess.ts, 442, 13)) +>p : Symbol(R.p, Decl(keyofAndIndexedAccess.ts, 435, 13)) } function f(p: K) { ->f : Symbol(f, Decl(keyofAndIndexedAccess.ts, 444, 1)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 446, 11)) ->R : Symbol(R, Decl(keyofAndIndexedAccess.ts, 438, 1)) ->p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 446, 30)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 446, 11)) +>f : Symbol(f, Decl(keyofAndIndexedAccess.ts, 437, 1)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 439, 11)) +>R : Symbol(R, Decl(keyofAndIndexedAccess.ts, 431, 1)) +>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 439, 30)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 439, 11)) let a: any; ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 447, 7)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 440, 7)) a[p].add; // any ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 447, 7)) ->p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 446, 30)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 440, 7)) +>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 439, 30)) } // Repro from #12651 type MethodDescriptor = { ->MethodDescriptor : Symbol(MethodDescriptor, Decl(keyofAndIndexedAccess.ts, 449, 1)) +>MethodDescriptor : Symbol(MethodDescriptor, Decl(keyofAndIndexedAccess.ts, 442, 1)) name: string; ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 453, 25)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 446, 25)) args: any[]; ->args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 454, 14)) +>args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 447, 14)) returnValue: any; ->returnValue : Symbol(returnValue, Decl(keyofAndIndexedAccess.ts, 455, 13)) +>returnValue : Symbol(returnValue, Decl(keyofAndIndexedAccess.ts, 448, 13)) } declare function dispatchMethod(name: M['name'], args: M['args']): M['returnValue']; ->dispatchMethod : Symbol(dispatchMethod, Decl(keyofAndIndexedAccess.ts, 457, 1)) ->M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 459, 32)) ->MethodDescriptor : Symbol(MethodDescriptor, Decl(keyofAndIndexedAccess.ts, 449, 1)) ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 459, 60)) ->M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 459, 32)) ->args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 459, 76)) ->M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 459, 32)) ->M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 459, 32)) +>dispatchMethod : Symbol(dispatchMethod, Decl(keyofAndIndexedAccess.ts, 450, 1)) +>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 452, 32)) +>MethodDescriptor : Symbol(MethodDescriptor, Decl(keyofAndIndexedAccess.ts, 442, 1)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 452, 60)) +>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 452, 32)) +>args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 452, 76)) +>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 452, 32)) +>M : Symbol(M, Decl(keyofAndIndexedAccess.ts, 452, 32)) type SomeMethodDescriptor = { ->SomeMethodDescriptor : Symbol(SomeMethodDescriptor, Decl(keyofAndIndexedAccess.ts, 459, 112)) +>SomeMethodDescriptor : Symbol(SomeMethodDescriptor, Decl(keyofAndIndexedAccess.ts, 452, 112)) name: "someMethod"; ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 461, 29)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 454, 29)) args: [string, number]; ->args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 462, 20)) +>args : Symbol(args, Decl(keyofAndIndexedAccess.ts, 455, 20)) returnValue: string[]; ->returnValue : Symbol(returnValue, Decl(keyofAndIndexedAccess.ts, 463, 24)) +>returnValue : Symbol(returnValue, Decl(keyofAndIndexedAccess.ts, 456, 24)) } let result = dispatchMethod("someMethod", ["hello", 35]); ->result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 467, 3)) ->dispatchMethod : Symbol(dispatchMethod, Decl(keyofAndIndexedAccess.ts, 457, 1)) ->SomeMethodDescriptor : Symbol(SomeMethodDescriptor, Decl(keyofAndIndexedAccess.ts, 459, 112)) +>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 460, 3)) +>dispatchMethod : Symbol(dispatchMethod, Decl(keyofAndIndexedAccess.ts, 450, 1)) +>SomeMethodDescriptor : Symbol(SomeMethodDescriptor, Decl(keyofAndIndexedAccess.ts, 452, 112)) // Repro from #13073 type KeyTypes = "a" | "b" ->KeyTypes : Symbol(KeyTypes, Decl(keyofAndIndexedAccess.ts, 467, 79)) +>KeyTypes : Symbol(KeyTypes, Decl(keyofAndIndexedAccess.ts, 460, 79)) let MyThingy: { [key in KeyTypes]: string[] }; ->MyThingy : Symbol(MyThingy, Decl(keyofAndIndexedAccess.ts, 472, 3)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 472, 17)) ->KeyTypes : Symbol(KeyTypes, Decl(keyofAndIndexedAccess.ts, 467, 79)) +>MyThingy : Symbol(MyThingy, Decl(keyofAndIndexedAccess.ts, 465, 3)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 465, 17)) +>KeyTypes : Symbol(KeyTypes, Decl(keyofAndIndexedAccess.ts, 460, 79)) function addToMyThingy(key: S) { ->addToMyThingy : Symbol(addToMyThingy, Decl(keyofAndIndexedAccess.ts, 472, 46)) ->S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 474, 23)) ->KeyTypes : Symbol(KeyTypes, Decl(keyofAndIndexedAccess.ts, 467, 79)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 474, 43)) ->S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 474, 23)) +>addToMyThingy : Symbol(addToMyThingy, Decl(keyofAndIndexedAccess.ts, 465, 46)) +>S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 467, 23)) +>KeyTypes : Symbol(KeyTypes, Decl(keyofAndIndexedAccess.ts, 460, 79)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 467, 43)) +>S : Symbol(S, Decl(keyofAndIndexedAccess.ts, 467, 23)) MyThingy[key].push("a"); >MyThingy[key].push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) ->MyThingy : Symbol(MyThingy, Decl(keyofAndIndexedAccess.ts, 472, 3)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 474, 43)) +>MyThingy : Symbol(MyThingy, Decl(keyofAndIndexedAccess.ts, 465, 3)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 467, 43)) >push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) } // Repro from #13102 type Handler = { ->Handler : Symbol(Handler, Decl(keyofAndIndexedAccess.ts, 476, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 480, 13)) +>Handler : Symbol(Handler, Decl(keyofAndIndexedAccess.ts, 469, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 473, 13)) onChange: (name: keyof T) => void; ->onChange : Symbol(onChange, Decl(keyofAndIndexedAccess.ts, 480, 19)) ->name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 481, 15)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 480, 13)) +>onChange : Symbol(onChange, Decl(keyofAndIndexedAccess.ts, 473, 19)) +>name : Symbol(name, Decl(keyofAndIndexedAccess.ts, 474, 15)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 473, 13)) }; function onChangeGenericFunction(handler: Handler) { ->onChangeGenericFunction : Symbol(onChangeGenericFunction, Decl(keyofAndIndexedAccess.ts, 482, 2)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 484, 33)) ->handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 484, 36)) ->Handler : Symbol(Handler, Decl(keyofAndIndexedAccess.ts, 476, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 484, 33)) ->preset : Symbol(preset, Decl(keyofAndIndexedAccess.ts, 484, 58)) +>onChangeGenericFunction : Symbol(onChangeGenericFunction, Decl(keyofAndIndexedAccess.ts, 475, 2)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 477, 33)) +>handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 477, 36)) +>Handler : Symbol(Handler, Decl(keyofAndIndexedAccess.ts, 469, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 477, 33)) +>preset : Symbol(preset, Decl(keyofAndIndexedAccess.ts, 477, 58)) handler.onChange('preset') ->handler.onChange : Symbol(onChange, Decl(keyofAndIndexedAccess.ts, 480, 19)) ->handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 484, 36)) ->onChange : Symbol(onChange, Decl(keyofAndIndexedAccess.ts, 480, 19)) +>handler.onChange : Symbol(onChange, Decl(keyofAndIndexedAccess.ts, 473, 19)) +>handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 477, 36)) +>onChange : Symbol(onChange, Decl(keyofAndIndexedAccess.ts, 473, 19)) } // Repro from #13285 function updateIds, K extends string>( ->updateIds : Symbol(updateIds, Decl(keyofAndIndexedAccess.ts, 486, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 490, 19)) +>updateIds : Symbol(updateIds, Decl(keyofAndIndexedAccess.ts, 479, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 483, 19)) >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 490, 47)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 490, 47)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 483, 47)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 483, 47)) obj: T, ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 490, 66)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 490, 19)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 483, 66)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 483, 19)) idFields: K[], ->idFields : Symbol(idFields, Decl(keyofAndIndexedAccess.ts, 491, 11)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 490, 47)) +>idFields : Symbol(idFields, Decl(keyofAndIndexedAccess.ts, 484, 11)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 483, 47)) idMapping: { [oldId: string]: string } ->idMapping : Symbol(idMapping, Decl(keyofAndIndexedAccess.ts, 492, 18)) ->oldId : Symbol(oldId, Decl(keyofAndIndexedAccess.ts, 493, 18)) +>idMapping : Symbol(idMapping, Decl(keyofAndIndexedAccess.ts, 485, 18)) +>oldId : Symbol(oldId, Decl(keyofAndIndexedAccess.ts, 486, 18)) ): Record { >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 490, 47)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 483, 47)) for (const idField of idFields) { ->idField : Symbol(idField, Decl(keyofAndIndexedAccess.ts, 495, 14)) ->idFields : Symbol(idFields, Decl(keyofAndIndexedAccess.ts, 491, 11)) +>idField : Symbol(idField, Decl(keyofAndIndexedAccess.ts, 488, 14)) +>idFields : Symbol(idFields, Decl(keyofAndIndexedAccess.ts, 484, 11)) const newId = idMapping[obj[idField]]; ->newId : Symbol(newId, Decl(keyofAndIndexedAccess.ts, 496, 13)) ->idMapping : Symbol(idMapping, Decl(keyofAndIndexedAccess.ts, 492, 18)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 490, 66)) ->idField : Symbol(idField, Decl(keyofAndIndexedAccess.ts, 495, 14)) +>newId : Symbol(newId, Decl(keyofAndIndexedAccess.ts, 489, 13)) +>idMapping : Symbol(idMapping, Decl(keyofAndIndexedAccess.ts, 485, 18)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 483, 66)) +>idField : Symbol(idField, Decl(keyofAndIndexedAccess.ts, 488, 14)) if (newId) { ->newId : Symbol(newId, Decl(keyofAndIndexedAccess.ts, 496, 13)) +>newId : Symbol(newId, Decl(keyofAndIndexedAccess.ts, 489, 13)) obj[idField] = newId; ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 490, 66)) ->idField : Symbol(idField, Decl(keyofAndIndexedAccess.ts, 495, 14)) ->newId : Symbol(newId, Decl(keyofAndIndexedAccess.ts, 496, 13)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 483, 66)) +>idField : Symbol(idField, Decl(keyofAndIndexedAccess.ts, 488, 14)) +>newId : Symbol(newId, Decl(keyofAndIndexedAccess.ts, 489, 13)) } } return obj; ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 490, 66)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 483, 66)) } // Repro from #13285 function updateIds2( ->updateIds2 : Symbol(updateIds2, Decl(keyofAndIndexedAccess.ts, 502, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 506, 20)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 506, 33)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 506, 54)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 506, 20)) +>updateIds2 : Symbol(updateIds2, Decl(keyofAndIndexedAccess.ts, 495, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 499, 20)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 499, 33)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 499, 54)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 499, 20)) obj: T, ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 506, 74)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 506, 20)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 499, 74)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 499, 20)) key: K, ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 507, 11)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 506, 54)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 500, 11)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 499, 54)) stringMap: { [oldId: string]: string } ->stringMap : Symbol(stringMap, Decl(keyofAndIndexedAccess.ts, 508, 11)) ->oldId : Symbol(oldId, Decl(keyofAndIndexedAccess.ts, 509, 18)) +>stringMap : Symbol(stringMap, Decl(keyofAndIndexedAccess.ts, 501, 11)) +>oldId : Symbol(oldId, Decl(keyofAndIndexedAccess.ts, 502, 18)) ) { var x = obj[key]; ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 511, 7)) ->obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 506, 74)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 507, 11)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 504, 7)) +>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 499, 74)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 500, 11)) stringMap[x]; // Should be OK. ->stringMap : Symbol(stringMap, Decl(keyofAndIndexedAccess.ts, 508, 11)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 511, 7)) +>stringMap : Symbol(stringMap, Decl(keyofAndIndexedAccess.ts, 501, 11)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 504, 7)) } // Repro from #13514 declare function head>(list: T): T[0]; ->head : Symbol(head, Decl(keyofAndIndexedAccess.ts, 513, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 517, 22)) +>head : Symbol(head, Decl(keyofAndIndexedAccess.ts, 506, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 510, 22)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->list : Symbol(list, Decl(keyofAndIndexedAccess.ts, 517, 44)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 517, 22)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 517, 22)) +>list : Symbol(list, Decl(keyofAndIndexedAccess.ts, 510, 44)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 510, 22)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 510, 22)) // Repro from #13604 class A { ->A : Symbol(A, Decl(keyofAndIndexedAccess.ts, 517, 59)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 521, 8)) +>A : Symbol(A, Decl(keyofAndIndexedAccess.ts, 510, 59)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 514, 8)) props: T & { foo: string }; ->props : Symbol(A.props, Decl(keyofAndIndexedAccess.ts, 521, 12)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 521, 8)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 522, 13)) +>props : Symbol(A.props, Decl(keyofAndIndexedAccess.ts, 514, 12)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 514, 8)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 515, 13)) } class B extends A<{ x: number}> { ->B : Symbol(B, Decl(keyofAndIndexedAccess.ts, 523, 1)) ->A : Symbol(A, Decl(keyofAndIndexedAccess.ts, 517, 59)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 525, 19)) +>B : Symbol(B, Decl(keyofAndIndexedAccess.ts, 516, 1)) +>A : Symbol(A, Decl(keyofAndIndexedAccess.ts, 510, 59)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 518, 19)) f(p: this["props"]) { ->f : Symbol(B.f, Decl(keyofAndIndexedAccess.ts, 525, 33)) ->p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 526, 3)) +>f : Symbol(B.f, Decl(keyofAndIndexedAccess.ts, 518, 33)) +>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 519, 3)) p.x; ->p.x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 525, 19)) ->p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 526, 3)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 525, 19)) +>p.x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 518, 19)) +>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 519, 3)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 518, 19)) } } // Repro from #13749 class Form { ->Form : Symbol(Form, Decl(keyofAndIndexedAccess.ts, 529, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 533, 11)) +>Form : Symbol(Form, Decl(keyofAndIndexedAccess.ts, 522, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 526, 11)) private childFormFactories: {[K in keyof T]: (v: T[K]) => Form} ->childFormFactories : Symbol(Form.childFormFactories, Decl(keyofAndIndexedAccess.ts, 533, 15)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 534, 34)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 533, 11)) ->v : Symbol(v, Decl(keyofAndIndexedAccess.ts, 534, 50)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 533, 11)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 534, 34)) ->Form : Symbol(Form, Decl(keyofAndIndexedAccess.ts, 529, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 533, 11)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 534, 34)) +>childFormFactories : Symbol(Form.childFormFactories, Decl(keyofAndIndexedAccess.ts, 526, 15)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 527, 34)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 526, 11)) +>v : Symbol(v, Decl(keyofAndIndexedAccess.ts, 527, 50)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 526, 11)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 527, 34)) +>Form : Symbol(Form, Decl(keyofAndIndexedAccess.ts, 522, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 526, 11)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 527, 34)) public set(prop: K, value: T[K]) { ->set : Symbol(Form.set, Decl(keyofAndIndexedAccess.ts, 534, 73)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 536, 15)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 533, 11)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 536, 34)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 536, 15)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 536, 42)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 533, 11)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 536, 15)) +>set : Symbol(Form.set, Decl(keyofAndIndexedAccess.ts, 527, 73)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 529, 15)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 526, 11)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 529, 34)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 529, 15)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 529, 42)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 526, 11)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 529, 15)) this.childFormFactories[prop](value) ->this.childFormFactories : Symbol(Form.childFormFactories, Decl(keyofAndIndexedAccess.ts, 533, 15)) ->this : Symbol(Form, Decl(keyofAndIndexedAccess.ts, 529, 1)) ->childFormFactories : Symbol(Form.childFormFactories, Decl(keyofAndIndexedAccess.ts, 533, 15)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 536, 34)) ->value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 536, 42)) +>this.childFormFactories : Symbol(Form.childFormFactories, Decl(keyofAndIndexedAccess.ts, 526, 15)) +>this : Symbol(Form, Decl(keyofAndIndexedAccess.ts, 522, 1)) +>childFormFactories : Symbol(Form.childFormFactories, Decl(keyofAndIndexedAccess.ts, 526, 15)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 529, 34)) +>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 529, 42)) } } // Repro from #13787 class SampleClass

{ ->SampleClass : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 539, 1)) ->P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 543, 18)) +>SampleClass : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 532, 1)) +>P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 536, 18)) public props: Readonly

; ->props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 543, 22)) +>props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 536, 22)) >Readonly : Symbol(Readonly, Decl(lib.es5.d.ts, --, --)) ->P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 543, 18)) +>P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 536, 18)) constructor(props: P) { ->props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 545, 16)) ->P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 543, 18)) +>props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 538, 16)) +>P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 536, 18)) this.props = Object.freeze(props); ->this.props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 543, 22)) ->this : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 539, 1)) ->props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 543, 22)) +>this.props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 536, 22)) +>this : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 532, 1)) +>props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 536, 22)) >Object.freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 545, 16)) +>props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 538, 16)) } } interface Foo { ->Foo : Symbol(Foo, Decl(keyofAndIndexedAccess.ts, 548, 1)) +>Foo : Symbol(Foo, Decl(keyofAndIndexedAccess.ts, 541, 1)) foo: string; ->foo : Symbol(Foo.foo, Decl(keyofAndIndexedAccess.ts, 550, 15)) +>foo : Symbol(Foo.foo, Decl(keyofAndIndexedAccess.ts, 543, 15)) } declare function merge(obj1: T, obj2: U): T & U; ->merge : Symbol(merge, Decl(keyofAndIndexedAccess.ts, 552, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 554, 23)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 554, 25)) ->obj1 : Symbol(obj1, Decl(keyofAndIndexedAccess.ts, 554, 29)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 554, 23)) ->obj2 : Symbol(obj2, Decl(keyofAndIndexedAccess.ts, 554, 37)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 554, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 554, 23)) ->U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 554, 25)) +>merge : Symbol(merge, Decl(keyofAndIndexedAccess.ts, 545, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 547, 23)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 547, 25)) +>obj1 : Symbol(obj1, Decl(keyofAndIndexedAccess.ts, 547, 29)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 547, 23)) +>obj2 : Symbol(obj2, Decl(keyofAndIndexedAccess.ts, 547, 37)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 547, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 547, 23)) +>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 547, 25)) class AnotherSampleClass extends SampleClass { ->AnotherSampleClass : Symbol(AnotherSampleClass, Decl(keyofAndIndexedAccess.ts, 554, 54)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 556, 25)) ->SampleClass : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 539, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 556, 25)) ->Foo : Symbol(Foo, Decl(keyofAndIndexedAccess.ts, 548, 1)) +>AnotherSampleClass : Symbol(AnotherSampleClass, Decl(keyofAndIndexedAccess.ts, 547, 54)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 549, 25)) +>SampleClass : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 532, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 549, 25)) +>Foo : Symbol(Foo, Decl(keyofAndIndexedAccess.ts, 541, 1)) constructor(props: T) { ->props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 557, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 556, 25)) +>props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 550, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 549, 25)) const foo: Foo = { foo: "bar" }; ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 558, 13)) ->Foo : Symbol(Foo, Decl(keyofAndIndexedAccess.ts, 548, 1)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 558, 26)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 551, 13)) +>Foo : Symbol(Foo, Decl(keyofAndIndexedAccess.ts, 541, 1)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 551, 26)) super(merge(props, foo)); ->super : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 539, 1)) ->merge : Symbol(merge, Decl(keyofAndIndexedAccess.ts, 552, 1)) ->props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 557, 16)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 558, 13)) +>super : Symbol(SampleClass, Decl(keyofAndIndexedAccess.ts, 532, 1)) +>merge : Symbol(merge, Decl(keyofAndIndexedAccess.ts, 545, 1)) +>props : Symbol(props, Decl(keyofAndIndexedAccess.ts, 550, 16)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 551, 13)) } public brokenMethod() { ->brokenMethod : Symbol(AnotherSampleClass.brokenMethod, Decl(keyofAndIndexedAccess.ts, 560, 5)) +>brokenMethod : Symbol(AnotherSampleClass.brokenMethod, Decl(keyofAndIndexedAccess.ts, 553, 5)) this.props.foo.concat; >this.props.foo.concat : Symbol(String.concat, Decl(lib.es5.d.ts, --, --)) ->this.props.foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 550, 15)) ->this.props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 543, 22)) ->this : Symbol(AnotherSampleClass, Decl(keyofAndIndexedAccess.ts, 554, 54)) ->props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 543, 22)) ->foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 550, 15)) +>this.props.foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 543, 15)) +>this.props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 536, 22)) +>this : Symbol(AnotherSampleClass, Decl(keyofAndIndexedAccess.ts, 547, 54)) +>props : Symbol(SampleClass.props, Decl(keyofAndIndexedAccess.ts, 536, 22)) +>foo : Symbol(foo, Decl(keyofAndIndexedAccess.ts, 543, 15)) >concat : Symbol(String.concat, Decl(lib.es5.d.ts, --, --)) } } new AnotherSampleClass({}); ->AnotherSampleClass : Symbol(AnotherSampleClass, Decl(keyofAndIndexedAccess.ts, 554, 54)) +>AnotherSampleClass : Symbol(AnotherSampleClass, Decl(keyofAndIndexedAccess.ts, 547, 54)) // Positive repro from #17166 function f3>(t: T, k: K, tk: T[K]): void { ->f3 : Symbol(f3, Decl(keyofAndIndexedAccess.ts, 566, 27)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 569, 12)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 569, 14)) +>f3 : Symbol(f3, Decl(keyofAndIndexedAccess.ts, 559, 27)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 562, 12)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 562, 14)) >Extract : Symbol(Extract, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 569, 12)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 569, 51)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 569, 12)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 569, 56)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 569, 14)) ->tk : Symbol(tk, Decl(keyofAndIndexedAccess.ts, 569, 62)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 569, 12)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 569, 14)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 562, 12)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 562, 51)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 562, 12)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 562, 56)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 562, 14)) +>tk : Symbol(tk, Decl(keyofAndIndexedAccess.ts, 562, 62)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 562, 12)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 562, 14)) for (let key in t) { ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 570, 12)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 569, 51)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 563, 12)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 562, 51)) key = k // ok, K ==> keyof T ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 570, 12)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 569, 56)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 563, 12)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 562, 56)) t[key] = tk; // ok, T[K] ==> T[keyof T] ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 569, 51)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 570, 12)) ->tk : Symbol(tk, Decl(keyofAndIndexedAccess.ts, 569, 62)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 562, 51)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 563, 12)) +>tk : Symbol(tk, Decl(keyofAndIndexedAccess.ts, 562, 62)) } } // # 21185 type Predicates = { ->Predicates : Symbol(Predicates, Decl(keyofAndIndexedAccess.ts, 574, 1)) ->TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 577, 16)) +>Predicates : Symbol(Predicates, Decl(keyofAndIndexedAccess.ts, 567, 1)) +>TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 570, 16)) [T in keyof TaggedRecord]: (variant: TaggedRecord[keyof TaggedRecord]) => variant is TaggedRecord[T] ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 578, 3)) ->TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 577, 16)) ->variant : Symbol(variant, Decl(keyofAndIndexedAccess.ts, 578, 30)) ->TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 577, 16)) ->TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 577, 16)) ->variant : Symbol(variant, Decl(keyofAndIndexedAccess.ts, 578, 30)) ->TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 577, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 578, 3)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 571, 3)) +>TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 570, 16)) +>variant : Symbol(variant, Decl(keyofAndIndexedAccess.ts, 571, 30)) +>TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 570, 16)) +>TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 570, 16)) +>variant : Symbol(variant, Decl(keyofAndIndexedAccess.ts, 571, 30)) +>TaggedRecord : Symbol(TaggedRecord, Decl(keyofAndIndexedAccess.ts, 570, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 571, 3)) } // Repros from #23592 type Example = { [K in keyof T]: T[K]["prop"] }; ->Example : Symbol(Example, Decl(keyofAndIndexedAccess.ts, 579, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 583, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 583, 26)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 583, 13)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 583, 42)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 583, 63)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 583, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 583, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 583, 63)) +>Example : Symbol(Example, Decl(keyofAndIndexedAccess.ts, 572, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 576, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 576, 26)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 576, 13)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 576, 42)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 576, 63)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 576, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 576, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 576, 63)) type Result = Example<{ a: { prop: string }; b: { prop: number } }>; ->Result : Symbol(Result, Decl(keyofAndIndexedAccess.ts, 583, 93)) ->Example : Symbol(Example, Decl(keyofAndIndexedAccess.ts, 579, 1)) ->a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 584, 23)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 584, 28)) ->b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 584, 44)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 584, 49)) +>Result : Symbol(Result, Decl(keyofAndIndexedAccess.ts, 576, 93)) +>Example : Symbol(Example, Decl(keyofAndIndexedAccess.ts, 572, 1)) +>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 577, 23)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 577, 28)) +>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 577, 44)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 577, 49)) type Helper2 = { [K in keyof T]: Extract }; ->Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 584, 68)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 586, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 586, 21)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 586, 13)) +>Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 577, 68)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 579, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 579, 21)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 579, 13)) >Extract : Symbol(Extract, Decl(lib.es5.d.ts, --, --)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 586, 13)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 586, 21)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 586, 51)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 579, 13)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 579, 21)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 579, 51)) type Example2 = { [K in keyof Helper2]: Helper2[K]["prop"] }; ->Example2 : Symbol(Example2, Decl(keyofAndIndexedAccess.ts, 586, 67)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 587, 14)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 587, 22)) ->Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 584, 68)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 587, 14)) ->Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 584, 68)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 587, 14)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 587, 22)) +>Example2 : Symbol(Example2, Decl(keyofAndIndexedAccess.ts, 579, 67)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 580, 14)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 580, 22)) +>Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 577, 68)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 580, 14)) +>Helper2 : Symbol(Helper2, Decl(keyofAndIndexedAccess.ts, 577, 68)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 580, 14)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 580, 22)) type Result2 = Example2<{ 1: { prop: string }; 2: { prop: number } }>; ->Result2 : Symbol(Result2, Decl(keyofAndIndexedAccess.ts, 587, 70)) ->Example2 : Symbol(Example2, Decl(keyofAndIndexedAccess.ts, 586, 67)) ->1 : Symbol(1, Decl(keyofAndIndexedAccess.ts, 588, 25)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 588, 30)) ->2 : Symbol(2, Decl(keyofAndIndexedAccess.ts, 588, 46)) ->prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 588, 51)) +>Result2 : Symbol(Result2, Decl(keyofAndIndexedAccess.ts, 580, 70)) +>Example2 : Symbol(Example2, Decl(keyofAndIndexedAccess.ts, 579, 67)) +>1 : Symbol(1, Decl(keyofAndIndexedAccess.ts, 581, 25)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 581, 30)) +>2 : Symbol(2, Decl(keyofAndIndexedAccess.ts, 581, 46)) +>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 581, 51)) // Repro from #23618 type DBBoolTable = { [k in K]: 0 | 1 } ->DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 588, 70)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 592, 17)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 592, 40)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 592, 17)) +>DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 581, 70)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 585, 17)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 585, 40)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 585, 17)) enum Flag { ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 592, 56)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 585, 56)) FLAG_1 = "flag_1", ->FLAG_1 : Symbol(Flag.FLAG_1, Decl(keyofAndIndexedAccess.ts, 593, 11)) +>FLAG_1 : Symbol(Flag.FLAG_1, Decl(keyofAndIndexedAccess.ts, 586, 11)) FLAG_2 = "flag_2" ->FLAG_2 : Symbol(Flag.FLAG_2, Decl(keyofAndIndexedAccess.ts, 594, 22)) +>FLAG_2 : Symbol(Flag.FLAG_2, Decl(keyofAndIndexedAccess.ts, 587, 22)) } type SimpleDBRecord = { staticField: number } & DBBoolTable ->SimpleDBRecord : Symbol(SimpleDBRecord, Decl(keyofAndIndexedAccess.ts, 596, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 598, 20)) ->staticField : Symbol(staticField, Decl(keyofAndIndexedAccess.ts, 598, 44)) ->DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 588, 70)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 598, 20)) +>SimpleDBRecord : Symbol(SimpleDBRecord, Decl(keyofAndIndexedAccess.ts, 589, 1)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 591, 20)) +>staticField : Symbol(staticField, Decl(keyofAndIndexedAccess.ts, 591, 44)) +>DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 581, 70)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 591, 20)) function getFlagsFromSimpleRecord(record: SimpleDBRecord, flags: Flag[]) { ->getFlagsFromSimpleRecord : Symbol(getFlagsFromSimpleRecord, Decl(keyofAndIndexedAccess.ts, 598, 86)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 599, 34)) ->record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 599, 55)) ->SimpleDBRecord : Symbol(SimpleDBRecord, Decl(keyofAndIndexedAccess.ts, 596, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 599, 34)) ->flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 599, 84)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 599, 34)) +>getFlagsFromSimpleRecord : Symbol(getFlagsFromSimpleRecord, Decl(keyofAndIndexedAccess.ts, 591, 86)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 592, 34)) +>record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 592, 55)) +>SimpleDBRecord : Symbol(SimpleDBRecord, Decl(keyofAndIndexedAccess.ts, 589, 1)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 592, 34)) +>flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 592, 84)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 592, 34)) return record[flags[0]]; ->record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 599, 55)) ->flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 599, 84)) +>record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 592, 55)) +>flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 592, 84)) } type DynamicDBRecord = ({ dynamicField: number } | { dynamicField: string }) & DBBoolTable ->DynamicDBRecord : Symbol(DynamicDBRecord, Decl(keyofAndIndexedAccess.ts, 601, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 603, 21)) ->dynamicField : Symbol(dynamicField, Decl(keyofAndIndexedAccess.ts, 603, 46)) ->dynamicField : Symbol(dynamicField, Decl(keyofAndIndexedAccess.ts, 603, 73)) ->DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 588, 70)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 603, 21)) +>DynamicDBRecord : Symbol(DynamicDBRecord, Decl(keyofAndIndexedAccess.ts, 594, 1)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 596, 21)) +>dynamicField : Symbol(dynamicField, Decl(keyofAndIndexedAccess.ts, 596, 46)) +>dynamicField : Symbol(dynamicField, Decl(keyofAndIndexedAccess.ts, 596, 73)) +>DBBoolTable : Symbol(DBBoolTable, Decl(keyofAndIndexedAccess.ts, 581, 70)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 596, 21)) function getFlagsFromDynamicRecord(record: DynamicDBRecord, flags: Flag[]) { ->getFlagsFromDynamicRecord : Symbol(getFlagsFromDynamicRecord, Decl(keyofAndIndexedAccess.ts, 603, 117)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 604, 35)) ->record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 604, 56)) ->DynamicDBRecord : Symbol(DynamicDBRecord, Decl(keyofAndIndexedAccess.ts, 601, 1)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 604, 35)) ->flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 604, 86)) ->Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 604, 35)) +>getFlagsFromDynamicRecord : Symbol(getFlagsFromDynamicRecord, Decl(keyofAndIndexedAccess.ts, 596, 117)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 597, 35)) +>record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 597, 56)) +>DynamicDBRecord : Symbol(DynamicDBRecord, Decl(keyofAndIndexedAccess.ts, 594, 1)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 597, 35)) +>flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 597, 86)) +>Flag : Symbol(Flag, Decl(keyofAndIndexedAccess.ts, 597, 35)) return record[flags[0]]; ->record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 604, 56)) ->flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 604, 86)) +>record : Symbol(record, Decl(keyofAndIndexedAccess.ts, 597, 56)) +>flags : Symbol(flags, Decl(keyofAndIndexedAccess.ts, 597, 86)) } // Repro from #21368 interface I { ->I : Symbol(I, Decl(keyofAndIndexedAccess.ts, 606, 1)) +>I : Symbol(I, Decl(keyofAndIndexedAccess.ts, 599, 1)) foo: string; ->foo : Symbol(I.foo, Decl(keyofAndIndexedAccess.ts, 610, 13)) +>foo : Symbol(I.foo, Decl(keyofAndIndexedAccess.ts, 603, 13)) } declare function take(p: T): void; ->take : Symbol(take, Decl(keyofAndIndexedAccess.ts, 612, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 614, 22)) ->p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 614, 25)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 614, 22)) +>take : Symbol(take, Decl(keyofAndIndexedAccess.ts, 605, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 607, 22)) +>p : Symbol(p, Decl(keyofAndIndexedAccess.ts, 607, 25)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 607, 22)) function fn(o: T, k: K) { ->fn : Symbol(fn, Decl(keyofAndIndexedAccess.ts, 614, 37)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 616, 12)) ->I : Symbol(I, Decl(keyofAndIndexedAccess.ts, 606, 1)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 616, 24)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 616, 12)) ->o : Symbol(o, Decl(keyofAndIndexedAccess.ts, 616, 44)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 616, 12)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 616, 49)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 616, 24)) +>fn : Symbol(fn, Decl(keyofAndIndexedAccess.ts, 607, 37)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 609, 12)) +>I : Symbol(I, Decl(keyofAndIndexedAccess.ts, 599, 1)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 609, 24)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 609, 12)) +>o : Symbol(o, Decl(keyofAndIndexedAccess.ts, 609, 44)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 609, 12)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 609, 49)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 609, 24)) take<{} | null | undefined>(o[k]); ->take : Symbol(take, Decl(keyofAndIndexedAccess.ts, 612, 1)) ->o : Symbol(o, Decl(keyofAndIndexedAccess.ts, 616, 44)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 616, 49)) +>take : Symbol(take, Decl(keyofAndIndexedAccess.ts, 605, 1)) +>o : Symbol(o, Decl(keyofAndIndexedAccess.ts, 609, 44)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 609, 49)) take(o[k]); ->take : Symbol(take, Decl(keyofAndIndexedAccess.ts, 612, 1)) ->o : Symbol(o, Decl(keyofAndIndexedAccess.ts, 616, 44)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 616, 49)) +>take : Symbol(take, Decl(keyofAndIndexedAccess.ts, 605, 1)) +>o : Symbol(o, Decl(keyofAndIndexedAccess.ts, 609, 44)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 609, 49)) } // Repro from #23133 class Unbounded { ->Unbounded : Symbol(Unbounded, Decl(keyofAndIndexedAccess.ts, 619, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 623, 16)) +>Unbounded : Symbol(Unbounded, Decl(keyofAndIndexedAccess.ts, 612, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 616, 16)) foo(x: T[keyof T]) { ->foo : Symbol(Unbounded.foo, Decl(keyofAndIndexedAccess.ts, 623, 20)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 624, 8)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 623, 16)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 623, 16)) +>foo : Symbol(Unbounded.foo, Decl(keyofAndIndexedAccess.ts, 616, 20)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 617, 8)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 616, 16)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 616, 16)) let y: {} | undefined | null = x; ->y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 625, 11)) ->x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 624, 8)) +>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 618, 11)) +>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 617, 8)) } } // Repro from #23940 interface I7 { ->I7 : Symbol(I7, Decl(keyofAndIndexedAccess.ts, 627, 1)) +>I7 : Symbol(I7, Decl(keyofAndIndexedAccess.ts, 620, 1)) x: any; ->x : Symbol(I7.x, Decl(keyofAndIndexedAccess.ts, 631, 14)) +>x : Symbol(I7.x, Decl(keyofAndIndexedAccess.ts, 624, 14)) } type Foo7 = T; ->Foo7 : Symbol(Foo7, Decl(keyofAndIndexedAccess.ts, 633, 1)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 634, 10)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 634, 10)) +>Foo7 : Symbol(Foo7, Decl(keyofAndIndexedAccess.ts, 626, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 627, 10)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 627, 10)) declare function f7(type: K): Foo7; ->f7 : Symbol(f7, Decl(keyofAndIndexedAccess.ts, 634, 32)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 635, 20)) ->I7 : Symbol(I7, Decl(keyofAndIndexedAccess.ts, 627, 1)) ->type : Symbol(type, Decl(keyofAndIndexedAccess.ts, 635, 40)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 635, 20)) ->Foo7 : Symbol(Foo7, Decl(keyofAndIndexedAccess.ts, 633, 1)) ->I7 : Symbol(I7, Decl(keyofAndIndexedAccess.ts, 627, 1)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 635, 20)) +>f7 : Symbol(f7, Decl(keyofAndIndexedAccess.ts, 627, 32)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 628, 20)) +>I7 : Symbol(I7, Decl(keyofAndIndexedAccess.ts, 620, 1)) +>type : Symbol(type, Decl(keyofAndIndexedAccess.ts, 628, 40)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 628, 20)) +>Foo7 : Symbol(Foo7, Decl(keyofAndIndexedAccess.ts, 626, 1)) +>I7 : Symbol(I7, Decl(keyofAndIndexedAccess.ts, 620, 1)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 628, 20)) // Repro from #21770 type Dict = { [key in T]: number }; ->Dict : Symbol(Dict, Decl(keyofAndIndexedAccess.ts, 635, 62)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 639, 10)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 639, 33)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 639, 10)) +>Dict : Symbol(Dict, Decl(keyofAndIndexedAccess.ts, 628, 62)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 632, 10)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 632, 33)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 632, 10)) type DictDict = { [key in V]: Dict }; ->DictDict : Symbol(DictDict, Decl(keyofAndIndexedAccess.ts, 639, 53)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 640, 14)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 640, 31)) ->key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 640, 55)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 640, 14)) ->Dict : Symbol(Dict, Decl(keyofAndIndexedAccess.ts, 635, 62)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 640, 31)) +>DictDict : Symbol(DictDict, Decl(keyofAndIndexedAccess.ts, 632, 53)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 633, 14)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 633, 31)) +>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 633, 55)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 633, 14)) +>Dict : Symbol(Dict, Decl(keyofAndIndexedAccess.ts, 628, 62)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 633, 31)) function ff1(dd: DictDict, k1: V, k2: T): number { ->ff1 : Symbol(ff1, Decl(keyofAndIndexedAccess.ts, 640, 76)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 642, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 642, 30)) ->dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 642, 49)) ->DictDict : Symbol(DictDict, Decl(keyofAndIndexedAccess.ts, 639, 53)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 642, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 642, 30)) ->k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 642, 68)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 642, 13)) ->k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 642, 75)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 642, 30)) +>ff1 : Symbol(ff1, Decl(keyofAndIndexedAccess.ts, 633, 76)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 635, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 635, 30)) +>dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 635, 49)) +>DictDict : Symbol(DictDict, Decl(keyofAndIndexedAccess.ts, 632, 53)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 635, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 635, 30)) +>k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 635, 68)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 635, 13)) +>k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 635, 75)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 635, 30)) return dd[k1][k2]; ->dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 642, 49)) ->k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 642, 68)) ->k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 642, 75)) +>dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 635, 49)) +>k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 635, 68)) +>k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 635, 75)) } function ff2(dd: DictDict, k1: V, k2: T): number { ->ff2 : Symbol(ff2, Decl(keyofAndIndexedAccess.ts, 644, 1)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 646, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 646, 30)) ->dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 646, 49)) ->DictDict : Symbol(DictDict, Decl(keyofAndIndexedAccess.ts, 639, 53)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 646, 13)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 646, 30)) ->k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 646, 68)) ->V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 646, 13)) ->k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 646, 75)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 646, 30)) +>ff2 : Symbol(ff2, Decl(keyofAndIndexedAccess.ts, 637, 1)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 639, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 639, 30)) +>dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 639, 49)) +>DictDict : Symbol(DictDict, Decl(keyofAndIndexedAccess.ts, 632, 53)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 639, 13)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 639, 30)) +>k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 639, 68)) +>V : Symbol(V, Decl(keyofAndIndexedAccess.ts, 639, 13)) +>k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 639, 75)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 639, 30)) const d: Dict = dd[k1]; ->d : Symbol(d, Decl(keyofAndIndexedAccess.ts, 647, 9)) ->Dict : Symbol(Dict, Decl(keyofAndIndexedAccess.ts, 635, 62)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 646, 30)) ->dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 646, 49)) ->k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 646, 68)) +>d : Symbol(d, Decl(keyofAndIndexedAccess.ts, 640, 9)) +>Dict : Symbol(Dict, Decl(keyofAndIndexedAccess.ts, 628, 62)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 639, 30)) +>dd : Symbol(dd, Decl(keyofAndIndexedAccess.ts, 639, 49)) +>k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 639, 68)) return d[k2]; ->d : Symbol(d, Decl(keyofAndIndexedAccess.ts, 647, 9)) ->k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 646, 75)) +>d : Symbol(d, Decl(keyofAndIndexedAccess.ts, 640, 9)) +>k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 639, 75)) } // Repro from #26409 const cf1 = (t: T, k: K) => ->cf1 : Symbol(cf1, Decl(keyofAndIndexedAccess.ts, 653, 5)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 653, 13)) ->P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 653, 26)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 653, 65)) ->cool : Symbol(cool, Decl(keyofAndIndexedAccess.ts, 653, 48)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 653, 65)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 653, 13)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 653, 85)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 653, 13)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 653, 90)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 653, 65)) +>cf1 : Symbol(cf1, Decl(keyofAndIndexedAccess.ts, 646, 5)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 646, 13)) +>P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 646, 26)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 646, 65)) +>cool : Symbol(cool, Decl(keyofAndIndexedAccess.ts, 646, 48)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 646, 65)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 646, 13)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 646, 85)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 646, 13)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 646, 90)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 646, 65)) { const s: string = t[k]; ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 655, 9)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 653, 85)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 653, 90)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 648, 9)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 646, 85)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 646, 90)) t.cool; ->t.cool : Symbol(cool, Decl(keyofAndIndexedAccess.ts, 653, 48)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 653, 85)) ->cool : Symbol(cool, Decl(keyofAndIndexedAccess.ts, 653, 48)) +>t.cool : Symbol(cool, Decl(keyofAndIndexedAccess.ts, 646, 48)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 646, 85)) +>cool : Symbol(cool, Decl(keyofAndIndexedAccess.ts, 646, 48)) }; const cf2 = (t: T, k: K) => ->cf2 : Symbol(cf2, Decl(keyofAndIndexedAccess.ts, 659, 5)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 659, 13)) ->P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 659, 26)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 659, 54)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 659, 54)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 659, 13)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 659, 74)) ->T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 659, 13)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 659, 79)) ->K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 659, 54)) +>cf2 : Symbol(cf2, Decl(keyofAndIndexedAccess.ts, 652, 5)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 652, 13)) +>P : Symbol(P, Decl(keyofAndIndexedAccess.ts, 652, 26)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 652, 54)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 652, 54)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 652, 13)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 652, 74)) +>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 652, 13)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 652, 79)) +>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 652, 54)) { const s: string = t[k]; ->s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 661, 9)) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 659, 74)) ->k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 659, 79)) +>s : Symbol(s, Decl(keyofAndIndexedAccess.ts, 654, 9)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 652, 74)) +>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 652, 79)) t.cool; >t.cool : Symbol(cool) ->t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 659, 74)) +>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 652, 74)) >cool : Symbol(cool) }; diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index 58fd74f660..025ecc7a41 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -1207,12 +1207,11 @@ type S2 = { }; -function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K], x4: T[K]) { ->f90 : (x1: string, x2: T["a" | "b"], x3: S2[K], x4: T[K]) => void +function f90(x1: S2[keyof S2], x2: T[keyof S2], x3: S2[K]) { +>f90 : (x1: string, x2: T["a" | "b"], x3: S2[K]) => void >x1 : string >x2 : T["a" | "b"] >x3 : S2[K] ->x4 : T[K] x1 = x2; >x1 = x2 : T["a" | "b"] @@ -1224,11 +1223,6 @@ function f90(x1: S2[keyof S2], x2: T[keyof S2] >x1 : string >x3 : S2[K] - x1 = x4; ->x1 = x4 : T[K] ->x1 : string ->x4 : T[K] - x2 = x1; >x2 = x1 : string >x2 : T["a" | "b"] @@ -1239,11 +1233,6 @@ function f90(x1: S2[keyof S2], x2: T[keyof S2] >x2 : T["a" | "b"] >x3 : S2[K] - x2 = x4; ->x2 = x4 : T[K] ->x2 : T["a" | "b"] ->x4 : T[K] - x3 = x1; >x3 = x1 : string >x3 : S2[K] @@ -1254,26 +1243,6 @@ function f90(x1: S2[keyof S2], x2: T[keyof S2] >x3 : S2[K] >x2 : T["a" | "b"] - x3 = x4; ->x3 = x4 : T[K] ->x3 : S2[K] ->x4 : T[K] - - x4 = x1; ->x4 = x1 : string ->x4 : T[K] ->x1 : string - - x4 = x2; ->x4 = x2 : T["a" | "b"] ->x4 : T[K] ->x2 : T["a" | "b"] - - x4 = x3; ->x4 = x3 : S2[K] ->x4 : T[K] ->x3 : S2[K] - x1.length; >x1.length : number >x1 : string @@ -1287,11 +1256,6 @@ function f90(x1: S2[keyof S2], x2: T[keyof S2] x3.length; >x3.length : number >x3 : S2[K] ->length : number - - x4.length; ->x4.length : number ->x4 : T[K] >length : number } diff --git a/tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt b/tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt index 4053189aea..cba7ab5246 100644 --- a/tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt +++ b/tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt @@ -63,9 +63,12 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(117,5): error Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(122,5): error TS2322: Type '42' is not assignable to type 'keyof T'. tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(123,5): error TS2322: Type '"hello"' is not assignable to type 'keyof T'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(140,5): error TS2322: Type '42' is not assignable to type 'T[K]'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(141,5): error TS2322: Type '"hello"' is not assignable to type 'T[K]'. +tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(142,5): error TS2322: Type 'number[]' is not assignable to type 'T[K]'. -==== tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts (38 errors) ==== +==== tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts (41 errors) ==== class Shape { name: string; width: number; @@ -293,4 +296,29 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(123,5): error ~ !!! error TS2322: Type '"hello"' is not assignable to type 'keyof T'. } + + // Repro from #27470 + + type UndefinedKeys> = { + [K in keyof T]: undefined extends T[K] ? K : never + }; + + type MyType = {a: string, b: string | undefined} + + type Result1 = UndefinedKeys; + + const a1: Result1['a'] = 'a'; // Error + const b1: Result1['b'] = 'b'; + + function test1, K extends keyof T>(t: T, k: K) { + t[k] = 42; // Error + ~~~~ +!!! error TS2322: Type '42' is not assignable to type 'T[K]'. + t[k] = "hello"; // Error + ~~~~ +!!! error TS2322: Type '"hello"' is not assignable to type 'T[K]'. + t[k] = [10, 20]; // Error + ~~~~ +!!! error TS2322: Type 'number[]' is not assignable to type 'T[K]'. + } \ No newline at end of file diff --git a/tests/baselines/reference/keyofAndIndexedAccessErrors.js b/tests/baselines/reference/keyofAndIndexedAccessErrors.js index a3124ce4c7..88a1b74f14 100644 --- a/tests/baselines/reference/keyofAndIndexedAccessErrors.js +++ b/tests/baselines/reference/keyofAndIndexedAccessErrors.js @@ -123,6 +123,25 @@ function f4(k: keyof T) { k = 42; // error k = "hello"; // error } + +// Repro from #27470 + +type UndefinedKeys> = { + [K in keyof T]: undefined extends T[K] ? K : never +}; + +type MyType = {a: string, b: string | undefined} + +type Result1 = UndefinedKeys; + +const a1: Result1['a'] = 'a'; // Error +const b1: Result1['b'] = 'b'; + +function test1, K extends keyof T>(t: T, k: K) { + t[k] = 42; // Error + t[k] = "hello"; // Error + t[k] = [10, 20]; // Error +} //// [keyofAndIndexedAccessErrors.js] @@ -189,3 +208,10 @@ function f4(k) { k = 42; // error k = "hello"; // error } +var a1 = 'a'; // Error +var b1 = 'b'; +function test1(t, k) { + t[k] = 42; // Error + t[k] = "hello"; // Error + t[k] = [10, 20]; // Error +} diff --git a/tests/baselines/reference/keyofAndIndexedAccessErrors.symbols b/tests/baselines/reference/keyofAndIndexedAccessErrors.symbols index 72739eb76d..df1707849c 100644 --- a/tests/baselines/reference/keyofAndIndexedAccessErrors.symbols +++ b/tests/baselines/reference/keyofAndIndexedAccessErrors.symbols @@ -428,3 +428,61 @@ function f4(k: keyof T) { >k : Symbol(k, Decl(keyofAndIndexedAccessErrors.ts, 120, 50)) } +// Repro from #27470 + +type UndefinedKeys> = { +>UndefinedKeys : Symbol(UndefinedKeys, Decl(keyofAndIndexedAccessErrors.ts, 123, 1)) +>T : Symbol(T, Decl(keyofAndIndexedAccessErrors.ts, 127, 19)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) + + [K in keyof T]: undefined extends T[K] ? K : never +>K : Symbol(K, Decl(keyofAndIndexedAccessErrors.ts, 128, 3)) +>T : Symbol(T, Decl(keyofAndIndexedAccessErrors.ts, 127, 19)) +>T : Symbol(T, Decl(keyofAndIndexedAccessErrors.ts, 127, 19)) +>K : Symbol(K, Decl(keyofAndIndexedAccessErrors.ts, 128, 3)) +>K : Symbol(K, Decl(keyofAndIndexedAccessErrors.ts, 128, 3)) + +}; + +type MyType = {a: string, b: string | undefined} +>MyType : Symbol(MyType, Decl(keyofAndIndexedAccessErrors.ts, 129, 2)) +>a : Symbol(a, Decl(keyofAndIndexedAccessErrors.ts, 131, 15)) +>b : Symbol(b, Decl(keyofAndIndexedAccessErrors.ts, 131, 25)) + +type Result1 = UndefinedKeys; +>Result1 : Symbol(Result1, Decl(keyofAndIndexedAccessErrors.ts, 131, 48)) +>UndefinedKeys : Symbol(UndefinedKeys, Decl(keyofAndIndexedAccessErrors.ts, 123, 1)) +>MyType : Symbol(MyType, Decl(keyofAndIndexedAccessErrors.ts, 129, 2)) + +const a1: Result1['a'] = 'a'; // Error +>a1 : Symbol(a1, Decl(keyofAndIndexedAccessErrors.ts, 135, 5)) +>Result1 : Symbol(Result1, Decl(keyofAndIndexedAccessErrors.ts, 131, 48)) + +const b1: Result1['b'] = 'b'; +>b1 : Symbol(b1, Decl(keyofAndIndexedAccessErrors.ts, 136, 5)) +>Result1 : Symbol(Result1, Decl(keyofAndIndexedAccessErrors.ts, 131, 48)) + +function test1, K extends keyof T>(t: T, k: K) { +>test1 : Symbol(test1, Decl(keyofAndIndexedAccessErrors.ts, 136, 29)) +>T : Symbol(T, Decl(keyofAndIndexedAccessErrors.ts, 138, 15)) +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>K : Symbol(K, Decl(keyofAndIndexedAccessErrors.ts, 138, 45)) +>T : Symbol(T, Decl(keyofAndIndexedAccessErrors.ts, 138, 15)) +>t : Symbol(t, Decl(keyofAndIndexedAccessErrors.ts, 138, 65)) +>T : Symbol(T, Decl(keyofAndIndexedAccessErrors.ts, 138, 15)) +>k : Symbol(k, Decl(keyofAndIndexedAccessErrors.ts, 138, 70)) +>K : Symbol(K, Decl(keyofAndIndexedAccessErrors.ts, 138, 45)) + + t[k] = 42; // Error +>t : Symbol(t, Decl(keyofAndIndexedAccessErrors.ts, 138, 65)) +>k : Symbol(k, Decl(keyofAndIndexedAccessErrors.ts, 138, 70)) + + t[k] = "hello"; // Error +>t : Symbol(t, Decl(keyofAndIndexedAccessErrors.ts, 138, 65)) +>k : Symbol(k, Decl(keyofAndIndexedAccessErrors.ts, 138, 70)) + + t[k] = [10, 20]; // Error +>t : Symbol(t, Decl(keyofAndIndexedAccessErrors.ts, 138, 65)) +>k : Symbol(k, Decl(keyofAndIndexedAccessErrors.ts, 138, 70)) +} + diff --git a/tests/baselines/reference/keyofAndIndexedAccessErrors.types b/tests/baselines/reference/keyofAndIndexedAccessErrors.types index e5f8b6ee8e..cbf56e6f67 100644 --- a/tests/baselines/reference/keyofAndIndexedAccessErrors.types +++ b/tests/baselines/reference/keyofAndIndexedAccessErrors.types @@ -412,3 +412,56 @@ function f4(k: keyof T) { >"hello" : "hello" } +// Repro from #27470 + +type UndefinedKeys> = { +>UndefinedKeys : UndefinedKeys + + [K in keyof T]: undefined extends T[K] ? K : never +}; + +type MyType = {a: string, b: string | undefined} +>MyType : MyType +>a : string +>b : string + +type Result1 = UndefinedKeys; +>Result1 : UndefinedKeys + +const a1: Result1['a'] = 'a'; // Error +>a1 : "a" +>'a' : "a" + +const b1: Result1['b'] = 'b'; +>b1 : "b" +>'b' : "b" + +function test1, K extends keyof T>(t: T, k: K) { +>test1 : , K extends keyof T>(t: T, k: K) => void +>t : T +>k : K + + t[k] = 42; // Error +>t[k] = 42 : 42 +>t[k] : T[K] +>t : T +>k : K +>42 : 42 + + t[k] = "hello"; // Error +>t[k] = "hello" : "hello" +>t[k] : T[K] +>t : T +>k : K +>"hello" : "hello" + + t[k] = [10, 20]; // Error +>t[k] = [10, 20] : number[] +>t[k] : T[K] +>t : T +>k : K +>[10, 20] : number[] +>10 : 10 +>20 : 20 +} +