mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
604 B
Plaintext
19 lines
604 B
Plaintext
file2.js(1,1): error TS2322: Type 'number' is not assignable to type 'string'.
|
|
file2.js(5,1): error TS2322: Type 'boolean' is not assignable to type 'string'.
|
|
|
|
|
|
==== file.js (0 errors) ====
|
|
exports.foo = 42
|
|
exports.foo = "hello"
|
|
exports.foo = true
|
|
|
|
==== file2.js (2 errors) ====
|
|
exports.foo = 42
|
|
~~~~~~~~~~~
|
|
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
|
/** @type {string} */
|
|
exports.foo = "hello"
|
|
/** @type {boolean} */
|
|
exports.foo = true
|
|
~~~~~~~~~~~
|
|
!!! error TS2322: Type 'boolean' is not assignable to type 'string'. |