TypeScript/tests/baselines/reference/defaultIndexProps1.types

33 lines
1 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/defaultIndexProps1.ts ===
class Foo {
2015-04-13 23:01:57 +02:00
>Foo : Foo, Symbol(Foo, Decl(defaultIndexProps1.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(defaultIndexProps1.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(defaultIndexProps1.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(defaultIndexProps1.ts, 0, 0))
2014-08-15 23:33:16 +02:00
var q = f["v"];
2015-04-13 23:01:57 +02:00
>q : string, Symbol(q, Decl(defaultIndexProps1.ts, 6, 3))
2014-08-15 23:33:16 +02:00
>f["v"] : string
2015-04-13 23:01:57 +02:00
>f : Foo, Symbol(f, Decl(defaultIndexProps1.ts, 4, 3))
>"v" : string, Symbol(Foo.v, Decl(defaultIndexProps1.ts, 0, 11))
2014-08-15 23:33:16 +02:00
var o = {v:"Yo2"};
2015-04-13 23:01:57 +02:00
>o : { v: string; }, Symbol(o, Decl(defaultIndexProps1.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(defaultIndexProps1.ts, 8, 9))
2015-04-13 21:36:11 +02:00
>"Yo2" : string
2014-08-15 23:33:16 +02:00
var q2 = o["v"];
2015-04-13 23:01:57 +02:00
>q2 : string, Symbol(q2, Decl(defaultIndexProps1.ts, 10, 3))
2014-08-15 23:33:16 +02:00
>o["v"] : string
2015-04-13 23:01:57 +02:00
>o : { v: string; }, Symbol(o, Decl(defaultIndexProps1.ts, 8, 3))
>"v" : string, Symbol(v, Decl(defaultIndexProps1.ts, 8, 9))
2014-08-15 23:33:16 +02:00