mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 14:16:12 +03:00
15 lines
223 B
TypeScript
15 lines
223 B
TypeScript
|
// @strict: true
|
||
|
|
||
|
// assignments in shortcutting rhs
|
||
|
let a: number;
|
||
|
o ?? (a = 1);
|
||
|
a.toString();
|
||
|
|
||
|
// assignment flow
|
||
|
declare const o: { x: number } | undefined;
|
||
|
let x: { x: number } | boolean;
|
||
|
if (x = o ?? true) {
|
||
|
x;
|
||
|
}
|
||
|
|