swc/tests/tsc-references/es6/Symbols/symbolProperty22/input.ts/es5.1.normal/output.js

18 lines
387 B
JavaScript

function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
foo("", _defineProperty({
}, Symbol.unscopables, function(s) {
return s.length;
}));