mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
14 lines
339 B
TypeScript
14 lines
339 B
TypeScript
//// [tests/cases/compiler/controlFlowInitializedDestructuringVariables.ts] ////
|
|
|
|
//// [controlFlowInitializedDestructuringVariables.ts]
|
|
declare const obj: { a?: string, b?: number };
|
|
const {
|
|
a = "0",
|
|
b = +a,
|
|
} = obj;
|
|
|
|
|
|
//// [controlFlowInitializedDestructuringVariables.js]
|
|
"use strict";
|
|
const { a = "0", b = +a, } = obj;
|