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