mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
21 lines
517 B
TypeScript
21 lines
517 B
TypeScript
//// [tests/cases/conformance/es6/destructuring/destructuringObjectBindingPatternAndAssignment6.ts] ////
|
|
|
|
//// [destructuringObjectBindingPatternAndAssignment6.ts]
|
|
const a = "a";
|
|
const b = "b";
|
|
|
|
const { [a]: aVal, [b]: bVal } = (() => {
|
|
return { [a]: 1, [b]: 1 };
|
|
})();
|
|
console.log(aVal, bVal);
|
|
|
|
|
|
//// [destructuringObjectBindingPatternAndAssignment6.js]
|
|
"use strict";
|
|
const a = "a";
|
|
const b = "b";
|
|
const { [a]: aVal, [b]: bVal } = (() => {
|
|
return { [a]: 1, [b]: 1 };
|
|
})();
|
|
console.log(aVal, bVal);
|