TypeScript/tests/baselines/reference/conditionalExpression1.errors.txt
2015-07-19 11:23:19 -07:00

9 lines
476 B
Plaintext

tests/cases/compiler/conditionalExpression1.ts(1,5): error TS2322: Type 'number | string' is not assignable to type 'boolean'.
Type 'number' is not assignable to type 'boolean'.
==== tests/cases/compiler/conditionalExpression1.ts (1 errors) ====
var x: boolean = (true ? 1 : ""); // should be an error
~
!!! error TS2322: Type 'number | string' is not assignable to type 'boolean'.
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.