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
I am currently facing an issue while upgrading an old project to use SWC for compilation. The project consists of both JavaScript and TypeScript files, and there is a scenario where a TypeScript class (New.ts) extends a JavaScript class (Old.js). The TypeScript class includes a private property value, but during SWC compilation, this property is transformed into _define_property._(_assert_this_initialized._(_this), "value", void 0);, leading to value being overwritten as undefined.
We expect that when inheriting properties from a parent class, the initialization and access of those properties should remain intact during SWC compilation.
Actual behavior
No response
Version
1.3.107
Additional context
No response
The text was updated successfully, but these errors were encountered:
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Describe the bug
I am currently facing an issue while upgrading an old project to use SWC for compilation. The project consists of both JavaScript and TypeScript files, and there is a scenario where a TypeScript class (New.ts) extends a JavaScript class (Old.js). The TypeScript class includes a private property value, but during SWC compilation, this property is transformed into
_define_property._(_assert_this_initialized._(_this), "value", void 0);
, leading to value being overwritten asundefined
.Input code
Config
Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.3.107&code=H4sIAAAAAAAAAzXMQQ7CIBQE0P0%2FxbjTDUTdtfEKegak34hBauDTNmm4uy3a2c1M8rTGw3lucPOdeiWy3qS0FsyEJbYPSWK20sf94b%2BtkadLajA%2BMy44ns5tfQoVIr2RuPKoZDOXAp6EQ1f9H%2FWJbjDCqNKuQcjvO8eWyhfiG7IxmAAAAA%3D%3D&config=H4sIAAAAAAAAA22Quw6DMAxFd74Cee7apWuXLu0%2FWGBQ2rxkGwmE%2BPcmlFBUdYvvyc1RPFd1DU9p4FLP6ZiGiCzE%2B5wSmbzimBLQKZI0bKLCqVCVjDq0Qmu0fAgock%2BaWyTn7TrQqMQe7Y1sJJZElQfaoDPedNPR3AQXmUSKYJc69L2lv94XUbxaFHmgox%2BDDUGOrbXz9e4OMHIP7bAaSh1cSbZF5WXk7w2uhfxWtbwBcTGuOk0BAAA%3D
SWC Info output
No response
Expected behavior
We expect that when inheriting properties from a parent class, the initialization and access of those properties should remain intact during SWC compilation.
Actual behavior
No response
Version
1.3.107
Additional context
No response
The text was updated successfully, but these errors were encountered: