35 lines
1.6 KiB
Text
35 lines
1.6 KiB
Text
=== tests/cases/conformance/types/primitives/number/numberPropertyAccess.ts ===
|
|
var x = 1;
|
|
>x : number, Symbol(x,Decl(numberPropertyAccess.ts,0,3))
|
|
>1 : number
|
|
|
|
var a = x.toExponential();
|
|
>a : string, Symbol(a,Decl(numberPropertyAccess.ts,1,3))
|
|
>x.toExponential() : string
|
|
>x.toExponential : (fractionDigits?: number) => string, Symbol(Number.toExponential,Decl(lib.d.ts,469,45))
|
|
>x : number, Symbol(x,Decl(numberPropertyAccess.ts,0,3))
|
|
>toExponential : (fractionDigits?: number) => string, Symbol(Number.toExponential,Decl(lib.d.ts,469,45))
|
|
|
|
var b = x.hasOwnProperty('toFixed');
|
|
>b : boolean, Symbol(b,Decl(numberPropertyAccess.ts,2,3))
|
|
>x.hasOwnProperty('toFixed') : boolean
|
|
>x.hasOwnProperty : (v: string) => boolean, Symbol(Object.hasOwnProperty,Decl(lib.d.ts,105,22))
|
|
>x : number, Symbol(x,Decl(numberPropertyAccess.ts,0,3))
|
|
>hasOwnProperty : (v: string) => boolean, Symbol(Object.hasOwnProperty,Decl(lib.d.ts,105,22))
|
|
>'toFixed' : string
|
|
|
|
var c = x['toExponential']();
|
|
>c : string, Symbol(c,Decl(numberPropertyAccess.ts,4,3))
|
|
>x['toExponential']() : string
|
|
>x['toExponential'] : (fractionDigits?: number) => string
|
|
>x : number, Symbol(x,Decl(numberPropertyAccess.ts,0,3))
|
|
>'toExponential' : string, Symbol(Number.toExponential,Decl(lib.d.ts,469,45))
|
|
|
|
var d = x['hasOwnProperty']('toFixed');
|
|
>d : boolean, Symbol(d,Decl(numberPropertyAccess.ts,5,3))
|
|
>x['hasOwnProperty']('toFixed') : boolean
|
|
>x['hasOwnProperty'] : (v: string) => boolean
|
|
>x : number, Symbol(x,Decl(numberPropertyAccess.ts,0,3))
|
|
>'hasOwnProperty' : string, Symbol(Object.hasOwnProperty,Decl(lib.d.ts,105,22))
|
|
>'toFixed' : string
|
|
|