mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
17 lines
359 B
TypeScript
17 lines
359 B
TypeScript
//// [tests/cases/conformance/controlFlow/controlFlowConditionalExpression.ts] ////
|
|
|
|
//// [controlFlowConditionalExpression.ts]
|
|
let x: string | number | boolean;
|
|
let cond: boolean;
|
|
|
|
cond ? x = "" : x = 3;
|
|
x; // string | number
|
|
|
|
|
|
//// [controlFlowConditionalExpression.js]
|
|
"use strict";
|
|
let x;
|
|
let cond;
|
|
cond ? x = "" : x = 3;
|
|
x; // string | number
|