TypeScript/tests/baselines/reference/computedPropertyNamesContextualType5_ES5.types

27 lines
802 B
Text
Raw Normal View History

=== tests/cases/conformance/es6/computedProperties/computedPropertyNamesContextualType5_ES5.ts ===
interface I {
>I : I, Symbol(I,Decl(computedPropertyNamesContextualType5_ES5.ts,0,0))
[s: string]: any;
>s : string, Symbol(s,Decl(computedPropertyNamesContextualType5_ES5.ts,1,5))
[s: number]: any;
>s : number, Symbol(s,Decl(computedPropertyNamesContextualType5_ES5.ts,2,5))
}
var o: I = {
>o : I, Symbol(o,Decl(computedPropertyNamesContextualType5_ES5.ts,5,3))
>I : I, Symbol(I,Decl(computedPropertyNamesContextualType5_ES5.ts,0,0))
>{ [+"foo"]: "", [+"bar"]: 0} : { [x: string]: string | number; [x: number]: string | number; }
[+"foo"]: "",
>+"foo" : number
2015-04-13 21:36:11 +02:00
>"foo" : string
>"" : string
[+"bar"]: 0
>+"bar" : number
2015-04-13 21:36:11 +02:00
>"bar" : string
>0 : number
}