mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 23:27:56 +03:00
15 lines
447 B
TypeScript
15 lines
447 B
TypeScript
// @strict: true
|
|
// @target: esnext, es2021, es2020, es2015
|
|
|
|
function foo1(results: number[] | undefined, results1: number[] | undefined) {
|
|
(results ||= (results1 ||= [])).push(100);
|
|
}
|
|
|
|
function foo2(results: number[] | undefined, results1: number[] | undefined) {
|
|
(results ??= (results1 ??= [])).push(100);
|
|
}
|
|
|
|
function foo3(results: number[] | undefined, results1: number[] | undefined) {
|
|
(results &&= (results1 &&= [])).push(100);
|
|
}
|