-
Notifications
You must be signed in to change notification settings - Fork 80
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
refactor(core): use private variables instead of function wrappers #1106
Conversation
2ea520b
to
3ec46f7
Compare
3ec46f7
to
ff5ffe5
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1106 +/- ##
==========================================
+ Coverage 75.52% 75.56% +0.03%
==========================================
Files 80 80
Lines 16153 16154 +1
Branches 1520 1513 -7
==========================================
+ Hits 12200 12207 +7
+ Misses 3914 3908 -6
Partials 39 39
☔ View full report in Codecov by Sentry. |
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.
LGTM
Maybe it makes sense to add a comment why we use #
but in this case I don't think I would do that since we would need to explain the rational all over the place.
I think it is good to go as is 👍
I tried to address your feedback, @danielpeintner, in fcc3b70, let me know if you see further room for improvement :) |
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.
were they included in the TD? I've never noticed, otherwise, the comment is a little bit misleading.
The result is basically the same as before, the only difference is that we do not need the getter construction anymore. We could also remove the comments as it is common JS behavior, I guess it depends on how useful the reminder of this behavior is. |
Note: We used to have the workaround to wrap the internal state into functions to not be stringified in a TD. The current approach using private variables is much better in my regard. Hence I think the comment is fine 🤷♂️ |
As another addition to #1104, this PR replaces a couple of internal getters (that have been used for avoiding serialization) with built-in private variables, making the code a bit cleaner.