1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
=== tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType7_ES6.ts ===
interface I<T> {
>I : Symbol(I, Decl(computedPropertyNamesContextualType7_ES6.ts, 0, 0))
>T : Symbol(T, Decl(computedPropertyNamesContextualType7_ES6.ts, 0, 12))
[n: number]: T;
>n : Symbol(n, Decl(computedPropertyNamesContextualType7_ES6.ts, 1, 5))
>T : Symbol(T, Decl(computedPropertyNamesContextualType7_ES6.ts, 0, 12))
}
interface J<T> {
>J : Symbol(J, Decl(computedPropertyNamesContextualType7_ES6.ts, 2, 1))
>T : Symbol(T, Decl(computedPropertyNamesContextualType7_ES6.ts, 3, 12))
[s: string]: T;
>s : Symbol(s, Decl(computedPropertyNamesContextualType7_ES6.ts, 4, 5))
>T : Symbol(T, Decl(computedPropertyNamesContextualType7_ES6.ts, 3, 12))
}
declare function foo<T>(obj: I<T>): T;
>foo : Symbol(foo, Decl(computedPropertyNamesContextualType7_ES6.ts, 5, 1))
>T : Symbol(T, Decl(computedPropertyNamesContextualType7_ES6.ts, 7, 21))
>obj : Symbol(obj, Decl(computedPropertyNamesContextualType7_ES6.ts, 7, 24))
>I : Symbol(I, Decl(computedPropertyNamesContextualType7_ES6.ts, 0, 0))
>T : Symbol(T, Decl(computedPropertyNamesContextualType7_ES6.ts, 7, 21))
>T : Symbol(T, Decl(computedPropertyNamesContextualType7_ES6.ts, 7, 21))
declare function g<T>(obj: J<T>): T;
>g : Symbol(g, Decl(computedPropertyNamesContextualType7_ES6.ts, 7, 38))
>T : Symbol(T, Decl(computedPropertyNamesContextualType7_ES6.ts, 8, 19))
>obj : Symbol(obj, Decl(computedPropertyNamesContextualType7_ES6.ts, 8, 22))
>J : Symbol(J, Decl(computedPropertyNamesContextualType7_ES6.ts, 2, 1))
>T : Symbol(T, Decl(computedPropertyNamesContextualType7_ES6.ts, 8, 19))
>T : Symbol(T, Decl(computedPropertyNamesContextualType7_ES6.ts, 8, 19))
foo({
>foo : Symbol(foo, Decl(computedPropertyNamesContextualType7_ES6.ts, 5, 1))
0: () => { },
["hi" + "bye"]: true,
[0 + 1]: 0,
[+"hi"]: [0]
});
g({ p: "" });
>g : Symbol(g, Decl(computedPropertyNamesContextualType7_ES6.ts, 7, 38))
>p : Symbol(p, Decl(computedPropertyNamesContextualType7_ES6.ts, 17, 3))
|