We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node14 supports the object spread syntax, however when bundling the __spreadValues helper is used instead.
__spreadValues
config
build({ entryPoints: ['index.ts], outfile: 'index.js', bundle: true, platform: 'node', minify: false, target: ['node14'], })
input
const foo = { a: 4} const bar = { ...foo }
output
var __defProp = Object.defineProperty; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; // ts-src/events/utility/index.ts var foo = { a: 4 }; var bar = __spreadValues({}, foo);
The text was updated successfully, but these errors were encountered:
I did some digging and found a comment in the source code that lead to #951 which explains why we're not using object spread operators right now.
Sorry, something went wrong.
spread operator
nullish coalescing operator
No branches or pull requests
Node14 supports the object spread syntax, however when bundling the
__spreadValues
helper is used instead.config
input
output
The text was updated successfully, but these errors were encountered: