Files
tsgo/testdata/baselines/reference/submodule/conformance/assignFromNumberInterface.errors.txt

12 lines
513 B
Plaintext

assignFromNumberInterface.ts(3,1): error TS2322: Type 'Number' is not assignable to type 'number'.
'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible.
==== assignFromNumberInterface.ts (1 errors) ====
var x = 1;
declare var a: Number;
x = a;
~
!!! error TS2322: Type 'Number' is not assignable to type 'number'.
!!! error TS2322: 'number' is a primitive, but 'Number' is a wrapper object. Prefer using 'number' when possible.
a = x;