mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
23 lines
389 B
TypeScript
23 lines
389 B
TypeScript
//// [tests/cases/conformance/esnext/logicalAssignment/logicalAssignment11.ts] ////
|
|
|
|
//// [logicalAssignment11.ts]
|
|
let x: string | undefined;
|
|
|
|
let d: string | undefined;
|
|
d ?? (d = x ?? "x")
|
|
d.length;
|
|
|
|
let e: string | undefined;
|
|
e ??= x ?? "x"
|
|
e.length
|
|
|
|
//// [logicalAssignment11.js]
|
|
"use strict";
|
|
let x;
|
|
let d;
|
|
d ?? (d = x ?? "x");
|
|
d.length;
|
|
let e;
|
|
e ??= x ?? "x";
|
|
e.length;
|