Change object member functions to use regular functions#4199
Merged
lmccart merged 1 commit intoprocessing:masterfrom Dec 19, 2019
Merged
Change object member functions to use regular functions#4199lmccart merged 1 commit intoprocessing:masterfrom
lmccart merged 1 commit intoprocessing:masterfrom
Conversation
Member
|
thanks @limzykenneth this all looks good. I think you're correct on using regular functions for all static members. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #3875
Changes:
As per the issue, prototype methods are all reverted to using regular function regardless of whether they use
thisin the function body or not. One additional thing I think is necessary but I'm not 100% sure about (90% sure) is static methods of objects. From what I found, in particular this stackoverflow question, it seems it is good practice to use regular functions for static members but I found only reference toclasssyntax static members only.In any case, none of the converted functions use
thisin their function body so the functionalities will be exactly the same as before.PR Checklist
npm run lintpasses