Closed
Description
This issue was originally filed by @snitko
I'm not sure if this issue is implied by the "add reflection" thread here, but I just wanted to be more specific. I want to be able to do something like this
class Model {
// ... setting instance variables
Model(Map fields) {
fields.forEach((k,v) => this[k] = v);
}
}
It obviously doesn't work, because this
doesn't have a []=
method. I would be nice to be able to call methods (in this case, setters) dynamically or maybe even set instance variables names dynamically.