TypeScript/tests/baselines/reference/numberPropertyAccess.types

36 lines
916 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/conformance/types/primitives/number/numberPropertyAccess.ts ===
var x = 1;
>x : number
2015-04-13 21:36:11 +02:00
>1 : number
2014-08-15 23:33:16 +02:00
var a = x.toExponential();
>a : string
2014-08-15 23:33:16 +02:00
>x.toExponential() : string
>x.toExponential : (fractionDigits?: number) => string
>x : number
>toExponential : (fractionDigits?: number) => string
2014-08-15 23:33:16 +02:00
var b = x.hasOwnProperty('toFixed');
>b : boolean
2014-08-15 23:33:16 +02:00
>x.hasOwnProperty('toFixed') : boolean
>x.hasOwnProperty : (v: string) => boolean
>x : number
>hasOwnProperty : (v: string) => boolean
2015-04-13 21:36:11 +02:00
>'toFixed' : string
2014-08-15 23:33:16 +02:00
var c = x['toExponential']();
>c : string
2014-08-15 23:33:16 +02:00
>x['toExponential']() : string
>x['toExponential'] : (fractionDigits?: number) => string
>x : number
>'toExponential' : string
2014-08-15 23:33:16 +02:00
var d = x['hasOwnProperty']('toFixed');
>d : boolean
2014-08-15 23:33:16 +02:00
>x['hasOwnProperty']('toFixed') : boolean
>x['hasOwnProperty'] : (v: string) => boolean
>x : number
>'hasOwnProperty' : string
2015-04-13 21:36:11 +02:00
>'toFixed' : string
2014-08-15 23:33:16 +02:00