refactor: migrate polyfill module to TS - #1335
Conversation
PR SummaryLow Risk Overview Base64 and UTF8 helpers get explicit Imports from Reviewed by Cursor Bugbot for commit 02a8a14. Bugbot is set up for automated code reviews on this repo. Configure here. |
c49f9e3 to
1f44de1
Compare
rmi22186
left a comment
There was a problem hiding this comment.
The amount of changes to forEach, map, and filter is a little scary since there aren't unit tests for them. These were all originally copied and pasted from the links provided. Can you edit them to just make them do let/const, etc instead of doing a larger refactor?
Per review, the array polyfills are verbatim copies from the es5.github.io references and have no unit test coverage, so revert them to their original object-literal form and limit the change to let/const. The extracted functions and Array.prototype casts were not needed: noImplicitAny is off, so the original signatures compile and assign unchanged.
|



Background
polyfill.js(Base64/UTF8 helpers and Array polyfills) was one of the remaining JS modules.What Has Changed
src/polyfill.jstosrc/polyfill.tswith type annotationsmparticle-instance-manager.ts,persistence.js) continue to import./polyfillunchangedScreenshots/Video
Checklist
Additional Notes
Reference Issue (For employees only. Ignore if you are an outside contributor)