TypeScript/tests/baselines/reference/anyPropertyAccess.types

48 lines
1.2 KiB
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/types/any/anyPropertyAccess.ts ===
var x: any;
2015-04-13 23:01:57 +02:00
>x : any, Symbol(x, Decl(anyPropertyAccess.ts, 0, 3))
2014-08-15 23:33:16 +02:00
var a = x.foo;
2015-04-13 23:01:57 +02:00
>a : any, Symbol(a, Decl(anyPropertyAccess.ts, 1, 3))
2014-08-15 23:33:16 +02:00
>x.foo : any
2015-04-13 23:01:57 +02:00
>x : any, Symbol(x, Decl(anyPropertyAccess.ts, 0, 3))
2014-08-15 23:33:16 +02:00
>foo : any
var b = x['foo'];
2015-04-13 23:01:57 +02:00
>b : any, Symbol(b, Decl(anyPropertyAccess.ts, 2, 3))
2014-08-15 23:33:16 +02:00
>x['foo'] : any
2015-04-13 23:01:57 +02:00
>x : any, Symbol(x, Decl(anyPropertyAccess.ts, 0, 3))
2015-04-13 21:36:11 +02:00
>'foo' : string
2014-08-15 23:33:16 +02:00
var c = x['fn']();
2015-04-13 23:01:57 +02:00
>c : any, Symbol(c, Decl(anyPropertyAccess.ts, 3, 3))
2014-08-15 23:33:16 +02:00
>x['fn']() : any
>x['fn'] : any
2015-04-13 23:01:57 +02:00
>x : any, Symbol(x, Decl(anyPropertyAccess.ts, 0, 3))
2015-04-13 21:36:11 +02:00
>'fn' : string
2014-08-15 23:33:16 +02:00
var d = x.bar.baz;
2015-04-13 23:01:57 +02:00
>d : any, Symbol(d, Decl(anyPropertyAccess.ts, 4, 3))
2014-08-15 23:33:16 +02:00
>x.bar.baz : any
>x.bar : any
2015-04-13 23:01:57 +02:00
>x : any, Symbol(x, Decl(anyPropertyAccess.ts, 0, 3))
2014-08-15 23:33:16 +02:00
>bar : any
>baz : any
var e = x[0].foo;
2015-04-13 23:01:57 +02:00
>e : any, Symbol(e, Decl(anyPropertyAccess.ts, 5, 3))
2014-08-15 23:33:16 +02:00
>x[0].foo : any
>x[0] : any
2015-04-13 23:01:57 +02:00
>x : any, Symbol(x, Decl(anyPropertyAccess.ts, 0, 3))
2015-04-13 21:36:11 +02:00
>0 : number
2014-08-15 23:33:16 +02:00
>foo : any
var f = x['0'].bar;
2015-04-13 23:01:57 +02:00
>f : any, Symbol(f, Decl(anyPropertyAccess.ts, 6, 3))
2014-08-15 23:33:16 +02:00
>x['0'].bar : any
>x['0'] : any
2015-04-13 23:01:57 +02:00
>x : any, Symbol(x, Decl(anyPropertyAccess.ts, 0, 3))
2015-04-13 21:36:11 +02:00
>'0' : string
2014-08-15 23:33:16 +02:00
>bar : any