google / google/closure-compiler
Object spread causes polyfills even in modern language_out
Open
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
Version: From at least mid 2022 up to latest.
compilation_level ADVANCED
language_out ECMASCRIPT_2020
rewrite_polyfills false
With ES2020 and up, using `{x:foo, ...bar}` causes this to be added to the head:
```js
var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b
Contributor guide
Assessment
This issue has not been assessed yet.