2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/conformance/types/primitives/string/stringPropertyAccess.ts ===
|
|
|
|
var x = '';
|
2015-04-13 22:54:22 +02:00
|
|
|
>x : string, Symbol(x,Decl(stringPropertyAccess.ts,0,3))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'' : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var a = x.charAt(0);
|
2015-04-13 22:54:22 +02:00
|
|
|
>a : string, Symbol(a,Decl(stringPropertyAccess.ts,1,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>x.charAt(0) : string
|
2015-04-13 22:54:22 +02:00
|
|
|
>x.charAt : (pos: number) => string, Symbol(String.charAt,Decl(lib.d.ts,279,23))
|
|
|
|
>x : string, Symbol(x,Decl(stringPropertyAccess.ts,0,3))
|
|
|
|
>charAt : (pos: number) => string, Symbol(String.charAt,Decl(lib.d.ts,279,23))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var b = x.hasOwnProperty('charAt');
|
2015-04-13 22:54:22 +02:00
|
|
|
>b : boolean, Symbol(b,Decl(stringPropertyAccess.ts,2,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>x.hasOwnProperty('charAt') : boolean
|
2015-04-13 22:54:22 +02:00
|
|
|
>x.hasOwnProperty : (v: string) => boolean, Symbol(Object.hasOwnProperty,Decl(lib.d.ts,105,22))
|
|
|
|
>x : string, Symbol(x,Decl(stringPropertyAccess.ts,0,3))
|
|
|
|
>hasOwnProperty : (v: string) => boolean, Symbol(Object.hasOwnProperty,Decl(lib.d.ts,105,22))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'charAt' : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var c = x['charAt'](0);
|
2015-04-13 22:54:22 +02:00
|
|
|
>c : string, Symbol(c,Decl(stringPropertyAccess.ts,4,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>x['charAt'](0) : string
|
|
|
|
>x['charAt'] : (pos: number) => string
|
2015-04-13 22:54:22 +02:00
|
|
|
>x : string, Symbol(x,Decl(stringPropertyAccess.ts,0,3))
|
|
|
|
>'charAt' : string, Symbol(String.charAt,Decl(lib.d.ts,279,23))
|
2015-04-13 21:36:11 +02:00
|
|
|
>0 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
var e = x['hasOwnProperty']('toFixed');
|
2015-04-13 22:54:22 +02:00
|
|
|
>e : boolean, Symbol(e,Decl(stringPropertyAccess.ts,5,3))
|
2014-08-15 23:33:16 +02:00
|
|
|
>x['hasOwnProperty']('toFixed') : boolean
|
|
|
|
>x['hasOwnProperty'] : (v: string) => boolean
|
2015-04-13 22:54:22 +02:00
|
|
|
>x : string, Symbol(x,Decl(stringPropertyAccess.ts,0,3))
|
|
|
|
>'hasOwnProperty' : string, Symbol(Object.hasOwnProperty,Decl(lib.d.ts,105,22))
|
2015-04-13 21:36:11 +02:00
|
|
|
>'toFixed' : string
|
2014-08-15 23:33:16 +02:00
|
|
|
|