mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
16 lines
432 B
Plaintext
16 lines
432 B
Plaintext
controlFlowBinaryAndExpression.ts(8,1): error TS2454: Variable 'cond' is used before being assigned.
|
|
|
|
|
|
==== controlFlowBinaryAndExpression.ts (1 errors) ====
|
|
let x: string | number | boolean;
|
|
let cond: boolean;
|
|
|
|
(x = "") && (x = 0);
|
|
x; // string | number
|
|
|
|
x = "";
|
|
cond && (x = 0);
|
|
~~~~
|
|
!!! error TS2454: Variable 'cond' is used before being assigned.
|
|
x; // string | number
|
|
|