Accesssing ES6 class constructor function
tj.crowder at farsightsoftware.com
Thu Jan 5 19:01:55 UTC 2017
Apologies, my email was apparently slow and I didn't see your reply to
On Thu, Jan 5, 2017 at 6:28 PM, James Treworgy <jamietre at gmail.com> wrote:
(slaps forehead) this might - actually - be enough. I need to think about
> it a bit. The issues of concern are: ability to name the resulting class
> dynamically (which I remember some quasi-hack involving using dynamic
> properties of an object that it's possible)
Yup. :-) Coincidentally, I demonstrated it in my previous note, see the
`di` function where it uses `cls.name` as a computed property.
> , and having a return value from "super" (is that possible? to be
> compatible with ES5 prototypes that return something from the constructor);
...and my `Reflect.construct` example may (or may not!) be relevant there.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss