50 lines
1.8 KiB
Plaintext
50 lines
1.8 KiB
Plaintext
=== tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType6_ES5.ts ===
|
|
interface I<T> {
|
|
>I : I<T>, Symbol(I, Decl(computedPropertyNamesContextualType6_ES5.ts, 0, 0))
|
|
>T : T, Symbol(T, Decl(computedPropertyNamesContextualType6_ES5.ts, 0, 12))
|
|
|
|
[s: string]: T;
|
|
>s : string, Symbol(s, Decl(computedPropertyNamesContextualType6_ES5.ts, 1, 5))
|
|
>T : T, Symbol(T, Decl(computedPropertyNamesContextualType6_ES5.ts, 0, 12))
|
|
}
|
|
|
|
declare function foo<T>(obj: I<T>): T
|
|
>foo : <T>(obj: I<T>) => T, Symbol(foo, Decl(computedPropertyNamesContextualType6_ES5.ts, 2, 1))
|
|
>T : T, Symbol(T, Decl(computedPropertyNamesContextualType6_ES5.ts, 4, 21))
|
|
>obj : I<T>, Symbol(obj, Decl(computedPropertyNamesContextualType6_ES5.ts, 4, 24))
|
|
>I : I<T>, Symbol(I, Decl(computedPropertyNamesContextualType6_ES5.ts, 0, 0))
|
|
>T : T, Symbol(T, Decl(computedPropertyNamesContextualType6_ES5.ts, 4, 21))
|
|
>T : T, Symbol(T, Decl(computedPropertyNamesContextualType6_ES5.ts, 4, 21))
|
|
|
|
foo({
|
|
>foo({ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : string | number | boolean | number[] | (() => void)
|
|
>foo : <T>(obj: I<T>) => T, Symbol(foo, Decl(computedPropertyNamesContextualType6_ES5.ts, 2, 1))
|
|
>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: string | number | boolean | number[] | (() => void); 0: () => void; p: string; }
|
|
|
|
p: "",
|
|
>p : string, Symbol(p, Decl(computedPropertyNamesContextualType6_ES5.ts, 6, 5))
|
|
>"" : string
|
|
|
|
0: () => { },
|
|
>() => { } : () => void
|
|
|
|
["hi" + "bye"]: true,
|
|
>"hi" + "bye" : string
|
|
>"hi" : string
|
|
>"bye" : string
|
|
>true : boolean
|
|
|
|
[0 + 1]: 0,
|
|
>0 + 1 : number
|
|
>0 : number
|
|
>1 : number
|
|
>0 : number
|
|
|
|
[+"hi"]: [0]
|
|
>+"hi" : number
|
|
>"hi" : string
|
|
>[0] : number[]
|
|
>0 : number
|
|
|
|
});
|