mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
18 lines
644 B
Plaintext
18 lines
644 B
Plaintext
//// [tests/cases/conformance/controlFlow/controlFlowConditionalExpression.ts] ////
|
|
|
|
=== controlFlowConditionalExpression.ts ===
|
|
let x: string | number | boolean;
|
|
>x : Symbol(x, Decl(controlFlowConditionalExpression.ts, 0, 3))
|
|
|
|
let cond: boolean;
|
|
>cond : Symbol(cond, Decl(controlFlowConditionalExpression.ts, 1, 3))
|
|
|
|
cond ? x = "" : x = 3;
|
|
>cond : Symbol(cond, Decl(controlFlowConditionalExpression.ts, 1, 3))
|
|
>x : Symbol(x, Decl(controlFlowConditionalExpression.ts, 0, 3))
|
|
>x : Symbol(x, Decl(controlFlowConditionalExpression.ts, 0, 3))
|
|
|
|
x; // string | number
|
|
>x : Symbol(x, Decl(controlFlowConditionalExpression.ts, 0, 3))
|
|
|