TypeScript/tests/baselines/reference/defaultIndexProps2.types

36 lines
809 B
Text
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/defaultIndexProps2.ts ===
class Foo {
2015-04-13 23:01:57 +02:00
>Foo : Foo, Symbol(Foo, Decl(defaultIndexProps2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
public v = "Yo";
2015-04-13 23:01:57 +02:00
>v : string, Symbol(v, Decl(defaultIndexProps2.ts, 0, 11))
2015-04-13 21:36:11 +02:00
>"Yo" : string
2014-08-15 23:33:16 +02:00
}
var f = new Foo();
2015-04-13 23:01:57 +02:00
>f : Foo, Symbol(f, Decl(defaultIndexProps2.ts, 4, 3))
2014-08-15 23:33:16 +02:00
>new Foo() : Foo
2015-04-13 23:01:57 +02:00
>Foo : typeof Foo, Symbol(Foo, Decl(defaultIndexProps2.ts, 0, 0))
2014-08-15 23:33:16 +02:00
// WScript.Echo(f[0]);
var o = {v:"Yo2"};
2015-04-13 23:01:57 +02:00
>o : { v: string; }, Symbol(o, Decl(defaultIndexProps2.ts, 8, 3))
2014-08-15 23:33:16 +02:00
>{v:"Yo2"} : { v: string; }
2015-04-13 23:01:57 +02:00
>v : string, Symbol(v, Decl(defaultIndexProps2.ts, 8, 9))
2015-04-13 21:36:11 +02:00
>"Yo2" : string
2014-08-15 23:33:16 +02:00
// WScript.Echo(o[0]);
1[0];
>1[0] : any
2015-04-13 21:36:11 +02:00
>1 : number
>0 : number
2014-08-15 23:33:16 +02:00
var q = "s"[0];
2015-04-13 23:01:57 +02:00
>q : string, Symbol(q, Decl(defaultIndexProps2.ts, 13, 3))
2014-08-15 23:33:16 +02:00
>"s"[0] : string
2015-04-13 21:36:11 +02:00
>"s" : string
>0 : number
2014-08-15 23:33:16 +02:00