You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same issue happens with Babel. The solution would be to use Object.getOwnPropertyDescriptors() to get properties with their values and/or getters/setters, instead of just iterating over properties.
Starting in 6.0 the minimum downlevel target will be ES6, which includes Object.assign, so there's no invocation of the spread helper anymore. Closing as moot.
Activity
Buslowicz commentedon Sep 21, 2018
Same issue happens with Babel. The solution would be to use
Object.getOwnPropertyDescriptors()to get properties with their values and/or getters/setters, instead of just iterating over properties.SBhojani commentedon Mar 26, 2020
I just came across this one. Here's another piece of code to demonstrate the issue:
In JS that logs 3 different random values. In TS, it logs a single random value thrice.
More at https://stackoverflow.com/questions/60861329/typescript-bug-this-difference-between-get-syntax-and-definepropertys-g .
guitarino commentedon Jan 7, 2023
Just ran into this issue; it still exists in 4.9.4. Babel TypeScript works correctly.
RyanCavanaugh commentedon Jul 23, 2025
Starting in 6.0 the minimum downlevel target will be ES6, which includes Object.assign, so there's no invocation of the spread helper anymore. Closing as moot.