|
|
|
|
@@ -766,278 +766,557 @@ function f60<T>(source: T, target: T) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function f70(func: <T, U>(k1: keyof (T | U), k2: keyof (T & U)) => void) {
|
|
|
|
|
>f70 : Symbol(f70, Decl(keyofAndIndexedAccess.ts, 218, 1))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 220, 13))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 220, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 220, 22))
|
|
|
|
|
>k1 : Symbol(k1, Decl(keyofAndIndexedAccess.ts, 220, 26))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 220, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 220, 22))
|
|
|
|
|
>k2 : Symbol(k2, Decl(keyofAndIndexedAccess.ts, 220, 44))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 220, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 220, 22))
|
|
|
|
|
|
|
|
|
|
func<{ a: any, b: any }, { a: any, c: any }>('a', 'a');
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 220, 13))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 221, 10))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 221, 18))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 221, 30))
|
|
|
|
|
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 221, 38))
|
|
|
|
|
|
|
|
|
|
func<{ a: any, b: any }, { a: any, c: any }>('a', 'b');
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 220, 13))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 222, 10))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 222, 18))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 222, 30))
|
|
|
|
|
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 222, 38))
|
|
|
|
|
|
|
|
|
|
func<{ a: any, b: any }, { a: any, c: any }>('a', 'c');
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 220, 13))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 223, 10))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 223, 18))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 223, 30))
|
|
|
|
|
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 223, 38))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function f71(func: <T, U>(x: T, y: U) => Partial<T & U>) {
|
|
|
|
|
>f71 : Symbol(f71, Decl(keyofAndIndexedAccess.ts, 224, 1))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 226, 13))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 226, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 226, 22))
|
|
|
|
|
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 226, 26))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 226, 20))
|
|
|
|
|
>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 226, 31))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 226, 22))
|
|
|
|
|
>Partial : Symbol(Partial, Decl(lib.d.ts, --, --))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 226, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 226, 22))
|
|
|
|
|
|
|
|
|
|
let x = func({ a: 1, b: "hello" }, { c: true });
|
|
|
|
|
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 227, 7))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 226, 13))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 227, 18))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 227, 24))
|
|
|
|
|
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 227, 40))
|
|
|
|
|
|
|
|
|
|
x.a; // number | undefined
|
|
|
|
|
>x.a : Symbol(a)
|
|
|
|
|
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 227, 7))
|
|
|
|
|
>a : Symbol(a)
|
|
|
|
|
|
|
|
|
|
x.b; // string | undefined
|
|
|
|
|
>x.b : Symbol(b)
|
|
|
|
|
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 227, 7))
|
|
|
|
|
>b : Symbol(b)
|
|
|
|
|
|
|
|
|
|
x.c; // boolean | undefined
|
|
|
|
|
>x.c : Symbol(c)
|
|
|
|
|
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 227, 7))
|
|
|
|
|
>c : Symbol(c)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function f72(func: <T, U, K extends keyof T | keyof U>(x: T, y: U, k: K) => (T & U)[K]) {
|
|
|
|
|
>f72 : Symbol(f72, Decl(keyofAndIndexedAccess.ts, 231, 1))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 233, 13))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 233, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 233, 22))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 233, 25))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 233, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 233, 22))
|
|
|
|
|
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 233, 55))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 233, 20))
|
|
|
|
|
>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 233, 60))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 233, 22))
|
|
|
|
|
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 233, 66))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 233, 25))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 233, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 233, 22))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 233, 25))
|
|
|
|
|
|
|
|
|
|
let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 234, 7))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 233, 13))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 234, 18))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 234, 24))
|
|
|
|
|
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 234, 40))
|
|
|
|
|
|
|
|
|
|
let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 235, 7))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 233, 13))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 235, 18))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 235, 24))
|
|
|
|
|
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 235, 40))
|
|
|
|
|
|
|
|
|
|
let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean
|
|
|
|
|
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 236, 7))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 233, 13))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 236, 18))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 236, 24))
|
|
|
|
|
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 236, 40))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function f73(func: <T, U, K extends keyof (T & U)>(x: T, y: U, k: K) => (T & U)[K]) {
|
|
|
|
|
>f73 : Symbol(f73, Decl(keyofAndIndexedAccess.ts, 237, 1))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 239, 13))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 239, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 239, 22))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 239, 25))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 239, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 239, 22))
|
|
|
|
|
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 239, 51))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 239, 20))
|
|
|
|
|
>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 239, 56))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 239, 22))
|
|
|
|
|
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 239, 62))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 239, 25))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 239, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 239, 22))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 239, 25))
|
|
|
|
|
|
|
|
|
|
let a = func({ a: 1, b: "hello" }, { c: true }, 'a'); // number
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 240, 7))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 239, 13))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 240, 18))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 240, 24))
|
|
|
|
|
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 240, 40))
|
|
|
|
|
|
|
|
|
|
let b = func({ a: 1, b: "hello" }, { c: true }, 'b'); // string
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 241, 7))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 239, 13))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 241, 18))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 241, 24))
|
|
|
|
|
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 241, 40))
|
|
|
|
|
|
|
|
|
|
let c = func({ a: 1, b: "hello" }, { c: true }, 'c'); // boolean
|
|
|
|
|
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 242, 7))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 239, 13))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 242, 18))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 242, 24))
|
|
|
|
|
>c : Symbol(c, Decl(keyofAndIndexedAccess.ts, 242, 40))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function f74(func: <T, U, K extends keyof (T | U)>(x: T, y: U, k: K) => (T | U)[K]) {
|
|
|
|
|
>f74 : Symbol(f74, Decl(keyofAndIndexedAccess.ts, 243, 1))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 245, 13))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 245, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 245, 22))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 245, 25))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 245, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 245, 22))
|
|
|
|
|
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 245, 51))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 245, 20))
|
|
|
|
|
>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 245, 56))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 245, 22))
|
|
|
|
|
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 245, 62))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 245, 25))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 245, 20))
|
|
|
|
|
>U : Symbol(U, Decl(keyofAndIndexedAccess.ts, 245, 22))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 245, 25))
|
|
|
|
|
|
|
|
|
|
let a = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'a'); // number
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 246, 7))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 245, 13))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 246, 18))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 246, 24))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 246, 40))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 246, 46))
|
|
|
|
|
|
|
|
|
|
let b = func({ a: 1, b: "hello" }, { a: 2, b: true }, 'b'); // string | boolean
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 247, 7))
|
|
|
|
|
>func : Symbol(func, Decl(keyofAndIndexedAccess.ts, 245, 13))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 247, 18))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 247, 24))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 247, 40))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 247, 46))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Repros from #12011
|
|
|
|
|
|
|
|
|
|
class Base {
|
|
|
|
|
>Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 218, 1))
|
|
|
|
|
>Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 248, 1))
|
|
|
|
|
|
|
|
|
|
get<K extends keyof this>(prop: K) {
|
|
|
|
|
>get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 222, 12))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 223, 8))
|
|
|
|
|
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 223, 30))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 223, 8))
|
|
|
|
|
>get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 252, 12))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 253, 8))
|
|
|
|
|
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 253, 30))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 253, 8))
|
|
|
|
|
|
|
|
|
|
return this[prop];
|
|
|
|
|
>this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 218, 1))
|
|
|
|
|
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 223, 30))
|
|
|
|
|
>this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 248, 1))
|
|
|
|
|
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 253, 30))
|
|
|
|
|
}
|
|
|
|
|
set<K extends keyof this>(prop: K, value: this[K]) {
|
|
|
|
|
>set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 225, 5))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 226, 8))
|
|
|
|
|
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 226, 30))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 226, 8))
|
|
|
|
|
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 226, 38))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 226, 8))
|
|
|
|
|
>set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 255, 5))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 256, 8))
|
|
|
|
|
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 256, 30))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 256, 8))
|
|
|
|
|
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 256, 38))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 256, 8))
|
|
|
|
|
|
|
|
|
|
this[prop] = value;
|
|
|
|
|
>this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 218, 1))
|
|
|
|
|
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 226, 30))
|
|
|
|
|
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 226, 38))
|
|
|
|
|
>this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 248, 1))
|
|
|
|
|
>prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 256, 30))
|
|
|
|
|
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 256, 38))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Person extends Base {
|
|
|
|
|
>Person : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 229, 1))
|
|
|
|
|
>Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 218, 1))
|
|
|
|
|
>Person : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 259, 1))
|
|
|
|
|
>Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 248, 1))
|
|
|
|
|
|
|
|
|
|
parts: number;
|
|
|
|
|
>parts : Symbol(Person.parts, Decl(keyofAndIndexedAccess.ts, 231, 27))
|
|
|
|
|
>parts : Symbol(Person.parts, Decl(keyofAndIndexedAccess.ts, 261, 27))
|
|
|
|
|
|
|
|
|
|
constructor(parts: number) {
|
|
|
|
|
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 233, 16))
|
|
|
|
|
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 263, 16))
|
|
|
|
|
|
|
|
|
|
super();
|
|
|
|
|
>super : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 218, 1))
|
|
|
|
|
>super : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 248, 1))
|
|
|
|
|
|
|
|
|
|
this.set("parts", parts);
|
|
|
|
|
>this.set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 225, 5))
|
|
|
|
|
>this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 229, 1))
|
|
|
|
|
>set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 225, 5))
|
|
|
|
|
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 233, 16))
|
|
|
|
|
>this.set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 255, 5))
|
|
|
|
|
>this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 259, 1))
|
|
|
|
|
>set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 255, 5))
|
|
|
|
|
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 263, 16))
|
|
|
|
|
}
|
|
|
|
|
getParts() {
|
|
|
|
|
>getParts : Symbol(Person.getParts, Decl(keyofAndIndexedAccess.ts, 236, 5))
|
|
|
|
|
>getParts : Symbol(Person.getParts, Decl(keyofAndIndexedAccess.ts, 266, 5))
|
|
|
|
|
|
|
|
|
|
return this.get("parts")
|
|
|
|
|
>this.get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 222, 12))
|
|
|
|
|
>this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 229, 1))
|
|
|
|
|
>get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 222, 12))
|
|
|
|
|
>this.get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 252, 12))
|
|
|
|
|
>this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 259, 1))
|
|
|
|
|
>get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 252, 12))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class OtherPerson {
|
|
|
|
|
>OtherPerson : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 240, 1))
|
|
|
|
|
>OtherPerson : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 270, 1))
|
|
|
|
|
|
|
|
|
|
parts: number;
|
|
|
|
|
>parts : Symbol(OtherPerson.parts, Decl(keyofAndIndexedAccess.ts, 242, 19))
|
|
|
|
|
>parts : Symbol(OtherPerson.parts, Decl(keyofAndIndexedAccess.ts, 272, 19))
|
|
|
|
|
|
|
|
|
|
constructor(parts: number) {
|
|
|
|
|
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 244, 16))
|
|
|
|
|
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 274, 16))
|
|
|
|
|
|
|
|
|
|
setProperty(this, "parts", parts);
|
|
|
|
|
>setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 81, 1))
|
|
|
|
|
>this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 240, 1))
|
|
|
|
|
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 244, 16))
|
|
|
|
|
>this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 270, 1))
|
|
|
|
|
>parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 274, 16))
|
|
|
|
|
}
|
|
|
|
|
getParts() {
|
|
|
|
|
>getParts : Symbol(OtherPerson.getParts, Decl(keyofAndIndexedAccess.ts, 246, 5))
|
|
|
|
|
>getParts : Symbol(OtherPerson.getParts, Decl(keyofAndIndexedAccess.ts, 276, 5))
|
|
|
|
|
|
|
|
|
|
return getProperty(this, "parts")
|
|
|
|
|
>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 77, 26))
|
|
|
|
|
>this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 240, 1))
|
|
|
|
|
>this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 270, 1))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Modified repro from #12544
|
|
|
|
|
|
|
|
|
|
function path<T, K1 extends keyof T>(obj: T, key1: K1): T[K1];
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 254, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 254, 16))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 254, 14))
|
|
|
|
|
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 254, 37))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 254, 14))
|
|
|
|
|
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 254, 44))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 254, 16))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 254, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 254, 16))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 284, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 284, 16))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 284, 14))
|
|
|
|
|
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 284, 37))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 284, 14))
|
|
|
|
|
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 284, 44))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 284, 16))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 284, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 284, 16))
|
|
|
|
|
|
|
|
|
|
function path<T, K1 extends keyof T, K2 extends keyof T[K1]>(obj: T, key1: K1, key2: K2): T[K1][K2];
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 255, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 255, 16))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 255, 14))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 255, 36))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 255, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 255, 16))
|
|
|
|
|
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 255, 61))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 255, 14))
|
|
|
|
|
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 255, 68))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 255, 16))
|
|
|
|
|
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 255, 78))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 255, 36))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 255, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 255, 16))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 255, 36))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 285, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 285, 16))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 285, 14))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 285, 36))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 285, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 285, 16))
|
|
|
|
|
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 285, 61))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 285, 14))
|
|
|
|
|
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 285, 68))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 285, 16))
|
|
|
|
|
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 285, 78))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 285, 36))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 285, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 285, 16))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 285, 36))
|
|
|
|
|
|
|
|
|
|
function path<T, K1 extends keyof T, K2 extends keyof T[K1], K3 extends keyof T[K1][K2]>(obj: T, key1: K1, key2: K2, key3: K3): T[K1][K2][K3];
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 256, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 256, 16))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 256, 14))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 256, 36))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 256, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 256, 16))
|
|
|
|
|
>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 256, 60))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 256, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 256, 16))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 256, 36))
|
|
|
|
|
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 256, 89))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 256, 14))
|
|
|
|
|
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 256, 96))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 256, 16))
|
|
|
|
|
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 256, 106))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 256, 36))
|
|
|
|
|
>key3 : Symbol(key3, Decl(keyofAndIndexedAccess.ts, 256, 116))
|
|
|
|
|
>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 256, 60))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 256, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 256, 16))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 256, 36))
|
|
|
|
|
>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 256, 60))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 286, 16))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 14))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 286, 36))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 286, 16))
|
|
|
|
|
>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 286, 60))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 286, 16))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 286, 36))
|
|
|
|
|
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 286, 89))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 14))
|
|
|
|
|
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 286, 96))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 286, 16))
|
|
|
|
|
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 286, 106))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 286, 36))
|
|
|
|
|
>key3 : Symbol(key3, Decl(keyofAndIndexedAccess.ts, 286, 116))
|
|
|
|
|
>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 286, 60))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 14))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 286, 16))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 286, 36))
|
|
|
|
|
>K3 : Symbol(K3, Decl(keyofAndIndexedAccess.ts, 286, 60))
|
|
|
|
|
|
|
|
|
|
function path(obj: any, ...keys: (string | number)[]): any;
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
|
|
|
|
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 257, 14))
|
|
|
|
|
>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 257, 23))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
|
|
|
|
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 287, 14))
|
|
|
|
|
>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 287, 23))
|
|
|
|
|
|
|
|
|
|
function path(obj: any, ...keys: (string | number)[]): any {
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
|
|
|
|
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 258, 14))
|
|
|
|
|
>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 258, 23))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
|
|
|
|
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 288, 14))
|
|
|
|
|
>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 288, 23))
|
|
|
|
|
|
|
|
|
|
let result = obj;
|
|
|
|
|
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 259, 7))
|
|
|
|
|
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 258, 14))
|
|
|
|
|
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 289, 7))
|
|
|
|
|
>obj : Symbol(obj, Decl(keyofAndIndexedAccess.ts, 288, 14))
|
|
|
|
|
|
|
|
|
|
for (let k of keys) {
|
|
|
|
|
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 260, 12))
|
|
|
|
|
>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 258, 23))
|
|
|
|
|
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 290, 12))
|
|
|
|
|
>keys : Symbol(keys, Decl(keyofAndIndexedAccess.ts, 288, 23))
|
|
|
|
|
|
|
|
|
|
result = result[k];
|
|
|
|
|
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 259, 7))
|
|
|
|
|
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 259, 7))
|
|
|
|
|
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 260, 12))
|
|
|
|
|
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 289, 7))
|
|
|
|
|
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 289, 7))
|
|
|
|
|
>k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 290, 12))
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 259, 7))
|
|
|
|
|
>result : Symbol(result, Decl(keyofAndIndexedAccess.ts, 289, 7))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Thing = {
|
|
|
|
|
>Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 264, 1))
|
|
|
|
|
>Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 294, 1))
|
|
|
|
|
|
|
|
|
|
a: { x: number, y: string },
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 266, 14))
|
|
|
|
|
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 267, 8))
|
|
|
|
|
>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 267, 19))
|
|
|
|
|
>a : Symbol(a, Decl(keyofAndIndexedAccess.ts, 296, 14))
|
|
|
|
|
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 297, 8))
|
|
|
|
|
>y : Symbol(y, Decl(keyofAndIndexedAccess.ts, 297, 19))
|
|
|
|
|
|
|
|
|
|
b: boolean
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 267, 32))
|
|
|
|
|
>b : Symbol(b, Decl(keyofAndIndexedAccess.ts, 297, 32))
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function f1(thing: Thing) {
|
|
|
|
|
>f1 : Symbol(f1, Decl(keyofAndIndexedAccess.ts, 269, 2))
|
|
|
|
|
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 272, 12))
|
|
|
|
|
>Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 264, 1))
|
|
|
|
|
>f1 : Symbol(f1, Decl(keyofAndIndexedAccess.ts, 299, 2))
|
|
|
|
|
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 302, 12))
|
|
|
|
|
>Thing : Symbol(Thing, Decl(keyofAndIndexedAccess.ts, 294, 1))
|
|
|
|
|
|
|
|
|
|
let x1 = path(thing, 'a'); // { x: number, y: string }
|
|
|
|
|
>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 273, 7))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
|
|
|
|
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 272, 12))
|
|
|
|
|
>x1 : Symbol(x1, Decl(keyofAndIndexedAccess.ts, 303, 7))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
|
|
|
|
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 302, 12))
|
|
|
|
|
|
|
|
|
|
let x2 = path(thing, 'a', 'y'); // string
|
|
|
|
|
>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 274, 7))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
|
|
|
|
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 272, 12))
|
|
|
|
|
>x2 : Symbol(x2, Decl(keyofAndIndexedAccess.ts, 304, 7))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
|
|
|
|
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 302, 12))
|
|
|
|
|
|
|
|
|
|
let x3 = path(thing, 'b'); // boolean
|
|
|
|
|
>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 275, 7))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
|
|
|
|
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 272, 12))
|
|
|
|
|
>x3 : Symbol(x3, Decl(keyofAndIndexedAccess.ts, 305, 7))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
|
|
|
|
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 302, 12))
|
|
|
|
|
|
|
|
|
|
let x4 = path(thing, ...['a', 'x']); // any
|
|
|
|
|
>x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 276, 7))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 250, 1), Decl(keyofAndIndexedAccess.ts, 254, 62), Decl(keyofAndIndexedAccess.ts, 255, 100), Decl(keyofAndIndexedAccess.ts, 256, 142), Decl(keyofAndIndexedAccess.ts, 257, 59))
|
|
|
|
|
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 272, 12))
|
|
|
|
|
>x4 : Symbol(x4, Decl(keyofAndIndexedAccess.ts, 306, 7))
|
|
|
|
|
>path : Symbol(path, Decl(keyofAndIndexedAccess.ts, 280, 1), Decl(keyofAndIndexedAccess.ts, 284, 62), Decl(keyofAndIndexedAccess.ts, 285, 100), Decl(keyofAndIndexedAccess.ts, 286, 142), Decl(keyofAndIndexedAccess.ts, 287, 59))
|
|
|
|
|
>thing : Symbol(thing, Decl(keyofAndIndexedAccess.ts, 302, 12))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Repro from comment in #12114
|
|
|
|
|
|
|
|
|
|
const assignTo2 = <T, K1 extends keyof T, K2 extends keyof T[K1]>(object: T, key1: K1, key2: K2) =>
|
|
|
|
|
>assignTo2 : Symbol(assignTo2, Decl(keyofAndIndexedAccess.ts, 281, 5))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 281, 19))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 281, 21))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 281, 19))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 281, 41))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 281, 19))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 281, 21))
|
|
|
|
|
>object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 281, 66))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 281, 19))
|
|
|
|
|
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 281, 76))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 281, 21))
|
|
|
|
|
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 281, 86))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 281, 41))
|
|
|
|
|
>assignTo2 : Symbol(assignTo2, Decl(keyofAndIndexedAccess.ts, 311, 5))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 311, 19))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 311, 21))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 311, 19))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 311, 41))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 311, 19))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 311, 21))
|
|
|
|
|
>object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 311, 66))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 311, 19))
|
|
|
|
|
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 311, 76))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 311, 21))
|
|
|
|
|
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 311, 86))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 311, 41))
|
|
|
|
|
|
|
|
|
|
(value: T[K1][K2]) => object[key1][key2] = value;
|
|
|
|
|
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 282, 5))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 281, 19))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 281, 21))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 281, 41))
|
|
|
|
|
>object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 281, 66))
|
|
|
|
|
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 281, 76))
|
|
|
|
|
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 281, 86))
|
|
|
|
|
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 282, 5))
|
|
|
|
|
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 312, 5))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 311, 19))
|
|
|
|
|
>K1 : Symbol(K1, Decl(keyofAndIndexedAccess.ts, 311, 21))
|
|
|
|
|
>K2 : Symbol(K2, Decl(keyofAndIndexedAccess.ts, 311, 41))
|
|
|
|
|
>object : Symbol(object, Decl(keyofAndIndexedAccess.ts, 311, 66))
|
|
|
|
|
>key1 : Symbol(key1, Decl(keyofAndIndexedAccess.ts, 311, 76))
|
|
|
|
|
>key2 : Symbol(key2, Decl(keyofAndIndexedAccess.ts, 311, 86))
|
|
|
|
|
>value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 312, 5))
|
|
|
|
|
|
|
|
|
|
// Modified repro from #12573
|
|
|
|
|
|
|
|
|
|
declare function one<T>(handler: (t: T) => void): T
|
|
|
|
|
>one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 282, 53))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 21))
|
|
|
|
|
>handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 286, 24))
|
|
|
|
|
>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 286, 34))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 21))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 286, 21))
|
|
|
|
|
>one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 312, 53))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 316, 21))
|
|
|
|
|
>handler : Symbol(handler, Decl(keyofAndIndexedAccess.ts, 316, 24))
|
|
|
|
|
>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 316, 34))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 316, 21))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 316, 21))
|
|
|
|
|
|
|
|
|
|
var empty = one(() => {}) // inferred as {}, expected
|
|
|
|
|
>empty : Symbol(empty, Decl(keyofAndIndexedAccess.ts, 287, 3))
|
|
|
|
|
>one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 282, 53))
|
|
|
|
|
>empty : Symbol(empty, Decl(keyofAndIndexedAccess.ts, 317, 3))
|
|
|
|
|
>one : Symbol(one, Decl(keyofAndIndexedAccess.ts, 312, 53))
|
|
|
|
|
|
|
|
|
|
type Handlers<T> = { [K in keyof T]: (t: T[K]) => void }
|
|
|
|
|
>Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 287, 25))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 289, 14))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 289, 22))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 289, 14))
|
|
|
|
|
>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 289, 38))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 289, 14))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 289, 22))
|
|
|
|
|
>Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 317, 25))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 319, 14))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 319, 22))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 319, 14))
|
|
|
|
|
>t : Symbol(t, Decl(keyofAndIndexedAccess.ts, 319, 38))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 319, 14))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 319, 22))
|
|
|
|
|
|
|
|
|
|
declare function on<T>(handlerHash: Handlers<T>): T
|
|
|
|
|
>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 289, 56))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 290, 20))
|
|
|
|
|
>handlerHash : Symbol(handlerHash, Decl(keyofAndIndexedAccess.ts, 290, 23))
|
|
|
|
|
>Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 287, 25))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 290, 20))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 290, 20))
|
|
|
|
|
>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 319, 56))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 20))
|
|
|
|
|
>handlerHash : Symbol(handlerHash, Decl(keyofAndIndexedAccess.ts, 320, 23))
|
|
|
|
|
>Handlers : Symbol(Handlers, Decl(keyofAndIndexedAccess.ts, 317, 25))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 20))
|
|
|
|
|
>T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 320, 20))
|
|
|
|
|
|
|
|
|
|
var hashOfEmpty1 = on({ test: () => {} }); // {}
|
|
|
|
|
>hashOfEmpty1 : Symbol(hashOfEmpty1, Decl(keyofAndIndexedAccess.ts, 291, 3))
|
|
|
|
|
>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 289, 56))
|
|
|
|
|
>test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 291, 23))
|
|
|
|
|
>hashOfEmpty1 : Symbol(hashOfEmpty1, Decl(keyofAndIndexedAccess.ts, 321, 3))
|
|
|
|
|
>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 319, 56))
|
|
|
|
|
>test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 321, 23))
|
|
|
|
|
|
|
|
|
|
var hashOfEmpty2 = on({ test: (x: boolean) => {} }); // { test: boolean }
|
|
|
|
|
>hashOfEmpty2 : Symbol(hashOfEmpty2, Decl(keyofAndIndexedAccess.ts, 292, 3))
|
|
|
|
|
>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 289, 56))
|
|
|
|
|
>test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 292, 23))
|
|
|
|
|
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 292, 31))
|
|
|
|
|
>hashOfEmpty2 : Symbol(hashOfEmpty2, Decl(keyofAndIndexedAccess.ts, 322, 3))
|
|
|
|
|
>on : Symbol(on, Decl(keyofAndIndexedAccess.ts, 319, 56))
|
|
|
|
|
>test : Symbol(test, Decl(keyofAndIndexedAccess.ts, 322, 23))
|
|
|
|
|
>x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 322, 31))
|
|
|
|
|
|
|
|
|
|
// Repro from #12624
|
|
|
|
|
|
|
|
|
|
interface Options1<Data, Computed> {
|
|
|
|
|
>Options1 : Symbol(Options1, Decl(keyofAndIndexedAccess.ts, 322, 52))
|
|
|
|
|
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 326, 19))
|
|
|
|
|
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 326, 24))
|
|
|
|
|
|
|
|
|
|
data?: Data
|
|
|
|
|
>data : Symbol(Options1.data, Decl(keyofAndIndexedAccess.ts, 326, 36))
|
|
|
|
|
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 326, 19))
|
|
|
|
|
|
|
|
|
|
computed?: Computed;
|
|
|
|
|
>computed : Symbol(Options1.computed, Decl(keyofAndIndexedAccess.ts, 327, 15))
|
|
|
|
|
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 326, 24))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
declare class Component1<Data, Computed> {
|
|
|
|
|
>Component1 : Symbol(Component1, Decl(keyofAndIndexedAccess.ts, 329, 1))
|
|
|
|
|
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 331, 25))
|
|
|
|
|
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 331, 30))
|
|
|
|
|
|
|
|
|
|
constructor(options: Options1<Data, Computed>);
|
|
|
|
|
>options : Symbol(options, Decl(keyofAndIndexedAccess.ts, 332, 16))
|
|
|
|
|
>Options1 : Symbol(Options1, Decl(keyofAndIndexedAccess.ts, 322, 52))
|
|
|
|
|
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 331, 25))
|
|
|
|
|
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 331, 30))
|
|
|
|
|
|
|
|
|
|
get<K extends keyof (Data & Computed)>(key: K): (Data & Computed)[K];
|
|
|
|
|
>get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 332, 51))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 333, 8))
|
|
|
|
|
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 331, 25))
|
|
|
|
|
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 331, 30))
|
|
|
|
|
>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 333, 43))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 333, 8))
|
|
|
|
|
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 331, 25))
|
|
|
|
|
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 331, 30))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 333, 8))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let c1 = new Component1({
|
|
|
|
|
>c1 : Symbol(c1, Decl(keyofAndIndexedAccess.ts, 336, 3))
|
|
|
|
|
>Component1 : Symbol(Component1, Decl(keyofAndIndexedAccess.ts, 329, 1))
|
|
|
|
|
|
|
|
|
|
data: {
|
|
|
|
|
>data : Symbol(data, Decl(keyofAndIndexedAccess.ts, 336, 25))
|
|
|
|
|
|
|
|
|
|
hello: ""
|
|
|
|
|
>hello : Symbol(hello, Decl(keyofAndIndexedAccess.ts, 337, 11))
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
c1.get("hello");
|
|
|
|
|
>c1.get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 332, 51))
|
|
|
|
|
>c1 : Symbol(c1, Decl(keyofAndIndexedAccess.ts, 336, 3))
|
|
|
|
|
>get : Symbol(Component1.get, Decl(keyofAndIndexedAccess.ts, 332, 51))
|
|
|
|
|
|
|
|
|
|
// Repro from #12625
|
|
|
|
|
|
|
|
|
|
interface Options2<Data, Computed> {
|
|
|
|
|
>Options2 : Symbol(Options2, Decl(keyofAndIndexedAccess.ts, 342, 16))
|
|
|
|
|
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 346, 19))
|
|
|
|
|
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 346, 24))
|
|
|
|
|
|
|
|
|
|
data?: Data
|
|
|
|
|
>data : Symbol(Options2.data, Decl(keyofAndIndexedAccess.ts, 346, 36))
|
|
|
|
|
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 346, 19))
|
|
|
|
|
|
|
|
|
|
computed?: Computed;
|
|
|
|
|
>computed : Symbol(Options2.computed, Decl(keyofAndIndexedAccess.ts, 347, 15))
|
|
|
|
|
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 346, 24))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
declare class Component2<Data, Computed> {
|
|
|
|
|
>Component2 : Symbol(Component2, Decl(keyofAndIndexedAccess.ts, 349, 1))
|
|
|
|
|
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 351, 25))
|
|
|
|
|
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 351, 30))
|
|
|
|
|
|
|
|
|
|
constructor(options: Options2<Data, Computed>);
|
|
|
|
|
>options : Symbol(options, Decl(keyofAndIndexedAccess.ts, 352, 16))
|
|
|
|
|
>Options2 : Symbol(Options2, Decl(keyofAndIndexedAccess.ts, 342, 16))
|
|
|
|
|
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 351, 25))
|
|
|
|
|
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 351, 30))
|
|
|
|
|
|
|
|
|
|
get<K extends keyof Data | keyof Computed>(key: K): (Data & Computed)[K];
|
|
|
|
|
>get : Symbol(Component2.get, Decl(keyofAndIndexedAccess.ts, 352, 51))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 353, 8))
|
|
|
|
|
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 351, 25))
|
|
|
|
|
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 351, 30))
|
|
|
|
|
>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 353, 47))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 353, 8))
|
|
|
|
|
>Data : Symbol(Data, Decl(keyofAndIndexedAccess.ts, 351, 25))
|
|
|
|
|
>Computed : Symbol(Computed, Decl(keyofAndIndexedAccess.ts, 351, 30))
|
|
|
|
|
>K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 353, 8))
|
|
|
|
|
}
|
|
|
|
|
|