[TS/JS] Pojo's API adjustment #4123
Closed
shayanhabibi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Pojo
As it currently stands using the Pojo attribute, it compiles a pojo from a class constructor.
With the above, we can use it like so
and we would expect
The following pseudocode however, would not work:
Recognise all fields in the constructor expression
It seems that the Pojo attribute picks up fields from the constructor arguments, and does not handle member properties otherwise. I would propose that a class marked Pojo should, instead, compile all setters within the constructor expression into the final Pojo.
This would greatly simplify writing Pojos.
Beta Was this translation helpful? Give feedback.
All reactions