28 lines
511 B
Text
28 lines
511 B
Text
=== tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType4_ES6.ts ===
|
|
interface I {
|
|
>I : I
|
|
|
|
[s: string]: any;
|
|
>s : string
|
|
|
|
[s: number]: any;
|
|
>s : number
|
|
}
|
|
|
|
var o: I = {
|
|
>o : I
|
|
>I : I
|
|
>{ [""+"foo"]: "", [""+"bar"]: 0} : { [x: string]: string | number; [x: number]: undefined; }
|
|
|
|
[""+"foo"]: "",
|
|
>""+"foo" : string
|
|
>"" : string
|
|
>"foo" : string
|
|
>"" : string
|
|
|
|
[""+"bar"]: 0
|
|
>""+"bar" : string
|
|
>"" : string
|
|
>"bar" : string
|
|
>0 : number
|
|
}
|