mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
12 lines
514 B
Plaintext
12 lines
514 B
Plaintext
assignFromStringInterface.ts(3,1): error TS2322: Type 'String' is not assignable to type 'string'.
|
|
'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible.
|
|
|
|
|
|
==== assignFromStringInterface.ts (1 errors) ====
|
|
var x = '';
|
|
declare var a: String;
|
|
x = a;
|
|
~
|
|
!!! error TS2322: Type 'String' is not assignable to type 'string'.
|
|
!!! error TS2322: 'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible.
|
|
a = x; |