-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runtime(js): use es6 class #1840
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
runtime/js/marshal.js:740
- [nitpick] Redeclaring the parameter 'pos' with 'var pos = pos;' is redundant and can be confusing; it is recommended to remove the redeclaration to use the parameter directly.
var pos = pos;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 11 changed files in this pull request and generated no comments.
Files not reviewed (6)
- runtime/js/bigarray.js: Evaluated as low risk
- runtime/js/nat.js: Evaluated as low risk
- runtime/js/sync.js: Evaluated as low risk
- runtime/js/fs_fake.js: Evaluated as low risk
- runtime/js/int64.js: Evaluated as low risk
- runtime/js/fs_node.js: Evaluated as low risk
c6eb838
to
cf8186a
Compare
Signed-off-by: Sora Morimoto <sora@morimoto.io>
Related PR: #1846 |
This PR updates several JavaScript runtime components to use ES6 class syntax instead of the traditional prototype-based object model. This modernization improves code readability and maintainability while aligning with current JavaScript best practices.
Changes
extends
keywordBenefits
extends
relationshipsDocumentation
ECMASCRIPT.md
to document ES6 class supportTesting
All existing tests continue to pass with the updated class implementations.
I recommend clicking this checkbox when reviewing on GitHub to improve readability:
