35 lines
916 B
Text
35 lines
916 B
Text
=== tests/cases/conformance/types/primitives/number/numberPropertyAccess.ts ===
|
|
var x = 1;
|
|
>x : number
|
|
>1 : number
|
|
|
|
var a = x.toExponential();
|
|
>a : string
|
|
>x.toExponential() : string
|
|
>x.toExponential : (fractionDigits?: number) => string
|
|
>x : number
|
|
>toExponential : (fractionDigits?: number) => string
|
|
|
|
var b = x.hasOwnProperty('toFixed');
|
|
>b : boolean
|
|
>x.hasOwnProperty('toFixed') : boolean
|
|
>x.hasOwnProperty : (v: string) => boolean
|
|
>x : number
|
|
>hasOwnProperty : (v: string) => boolean
|
|
>'toFixed' : string
|
|
|
|
var c = x['toExponential']();
|
|
>c : string
|
|
>x['toExponential']() : string
|
|
>x['toExponential'] : (fractionDigits?: number) => string
|
|
>x : number
|
|
>'toExponential' : string
|
|
|
|
var d = x['hasOwnProperty']('toFixed');
|
|
>d : boolean
|
|
>x['hasOwnProperty']('toFixed') : boolean
|
|
>x['hasOwnProperty'] : (v: string) => boolean
|
|
>x : number
|
|
>'hasOwnProperty' : string
|
|
>'toFixed' : string
|
|
|