mirror of
https://github.com/swc-project/swc.git
synced 2024-12-19 19:52:21 +03:00
12 lines
189 B
TypeScript
12 lines
189 B
TypeScript
|
// @strict: true
|
||
|
// @target: esnext, es2020, es2015
|
||
|
|
||
|
let x: string | undefined;
|
||
|
|
||
|
let d: string | undefined;
|
||
|
d ?? (d = x ?? "x")
|
||
|
d.length;
|
||
|
|
||
|
let e: string | undefined;
|
||
|
e ??= x ?? "x"
|
||
|
e.length
|