TypeScript/tests/cases/conformance/controlFlow/controlFlowConditionalExpression.ts
2016-03-25 21:29:58 +01:00

6 lines
99 B
TypeScript

let x: string | number | boolean;
let cond: boolean;
cond ? x = "" : x = 3;
x; // string | number