-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
Add a way to add setters/getters in js_class! #3911
Conversation
Converting to draft as I've come up with a better interface for getter/setter. Basically: prop name_of_prop as "nameOfProp" {
fn getter(...) {}
fn setter(...) {}
} with getter and setter optional. That way we don't need 3 sections for properties and it's a bit simpler. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3911 +/- ##
==========================================
+ Coverage 47.24% 51.59% +4.35%
==========================================
Files 476 468 -8
Lines 46892 44839 -2053
==========================================
+ Hits 22154 23136 +982
+ Misses 24738 21703 -3035 ☔ View full report in Codecov by Sentry. |
Okay this does use the new API now. |
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.
Good work! Looks perfect to me.
Thought: the syntax is getting a bit too DSL-like, so I'll probably see if I can start working on that proc macro. |
And update documentation for more explanation around the macro.