TypeScript/tests/baselines/reference/conditionalExpression1.types

10 lines
213 B
Text
Raw Normal View History

=== tests/cases/compiler/conditionalExpression1.ts ===
var x: boolean = (true ? 1 : ""); // should be an error
>x : boolean
>(true ? 1 : "") : 1 | ""
>true ? 1 : "" : 1 | ""
>true : true
>1 : 1
>"" : ""