TypeScript/tests/baselines/reference/defaultIndexProps2.types
2015-04-15 16:44:20 -07:00

36 lines
481 B
Plaintext

=== tests/cases/compiler/defaultIndexProps2.ts ===
class Foo {
>Foo : Foo
public v = "Yo";
>v : string
>"Yo" : string
}
var f = new Foo();
>f : Foo
>new Foo() : Foo
>Foo : typeof Foo
// WScript.Echo(f[0]);
var o = {v:"Yo2"};
>o : { v: string; }
>{v:"Yo2"} : { v: string; }
>v : string
>"Yo2" : string
// WScript.Echo(o[0]);
1[0];
>1[0] : any
>1 : number
>0 : number
var q = "s"[0];
>q : string
>"s"[0] : string
>"s" : string
>0 : number