swc/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment7.ts

11 lines
169 B
TypeScript

// @target: es5,esnext
enum K {
a = "a",
b = "b"
}
const { [K.a]: aVal, [K.b]: bVal } = (() => {
return { [K.a]: 1, [K.b]: 1 };
})();
console.log(aVal, bVal);