Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent transpilation issues by using
this
to reference static…
… props (#11088) **Related Issue:** #10731 ## Summary Referencing the class would cause incorrect JS output in certain vite builds: **source ✅** ```ts class i { static { this.DECIMALS = 100; } static { this.SHIFT = BigInt("1" + "0".repeat(i.DECIMALS)); } } ``` **transpiled ❌** ```ts var b = class { static{this.DECIMALS = 100;} static{this.SHIFT = BigInt("1" + "0".repeat(b.DECIMALS));} // TypeError: Cannot read properties of undefined (reading 'DECIMALS') } ```
- Loading branch information