37 lines
853 B
Text
37 lines
853 B
Text
=== tests/cases/conformance/types/primitives/string/stringPropertyAccess.ts ===
|
|
var x = '';
|
|
>x : string
|
|
>'' : string
|
|
|
|
var a = x.charAt(0);
|
|
>a : string
|
|
>x.charAt(0) : string
|
|
>x.charAt : (pos: number) => string
|
|
>x : string
|
|
>charAt : (pos: number) => string
|
|
>0 : number
|
|
|
|
var b = x.hasOwnProperty('charAt');
|
|
>b : boolean
|
|
>x.hasOwnProperty('charAt') : boolean
|
|
>x.hasOwnProperty : (v: string) => boolean
|
|
>x : string
|
|
>hasOwnProperty : (v: string) => boolean
|
|
>'charAt' : string
|
|
|
|
var c = x['charAt'](0);
|
|
>c : string
|
|
>x['charAt'](0) : string
|
|
>x['charAt'] : (pos: number) => string
|
|
>x : string
|
|
>'charAt' : string
|
|
>0 : number
|
|
|
|
var e = x['hasOwnProperty']('toFixed');
|
|
>e : boolean
|
|
>x['hasOwnProperty']('toFixed') : boolean
|
|
>x['hasOwnProperty'] : (v: string) => boolean
|
|
>x : string
|
|
>'hasOwnProperty' : string
|
|
>'toFixed' : string
|
|
|