mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
9 lines
434 B
Plaintext
9 lines
434 B
Plaintext
conditionalExpression1.ts(1,5): error TS2322: Type 'string | number' is not assignable to type 'boolean'.
|
|
Type 'string' is not assignable to type 'boolean'.
|
|
|
|
|
|
==== conditionalExpression1.ts (1 errors) ====
|
|
var x: boolean = (true ? 1 : ""); // should be an error
|
|
~
|
|
!!! error TS2322: Type 'string | number' is not assignable to type 'boolean'.
|
|
!!! error TS2322: Type 'string' is not assignable to type 'boolean'. |