49 lines
1 KiB
Text
49 lines
1 KiB
Text
=== tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType6_ES6.ts ===
|
|
interface I<T> {
|
|
>I : I<T>
|
|
>T : T
|
|
|
|
[s: string]: T;
|
|
>s : string
|
|
>T : T
|
|
}
|
|
|
|
declare function foo<T>(obj: I<T>): T
|
|
>foo : <T>(obj: I<T>) => T
|
|
>T : T
|
|
>obj : I<T>
|
|
>I : I<T>
|
|
>T : T
|
|
>T : T
|
|
|
|
foo({
|
|
>foo({ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]}) : string | number | boolean | (() => void) | number[]
|
|
>foo : <T>(obj: I<T>) => T
|
|
>{ p: "", 0: () => { }, ["hi" + "bye"]: true, [0 + 1]: 0, [+"hi"]: [0]} : { [x: string]: string | number | boolean | (() => void) | number[]; 0: () => void; p: string; }
|
|
|
|
p: "",
|
|
>p : string
|
|
>"" : 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
|
|
|
|
});
|