mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 15:12:08 +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;
|
|
}
|
|
|