That's not what HOCs do though. They return a completely different class.
-
-
Yehuda's been incredibly kind and helpful with me offline. It's clear what I'm asking for isn't possible.
-
I think we could make the pattern you want work as an escape valve but the returned class wouldn't get statics and proto (fine for your use)
-
So Class => class{} WOULD work, but Class => class extends Class{} would NOT? Or am I missing something?
-
not sure what "wouldn't get statics and proto" means?
-
It means the statics and proto would apply to the inner class, and the outer class is just a dummy wrapper. But this makes order significant
-
If the decor that 100% replaces class is run first, (inner) then next decorator above would get NEW class's members to work w/, right?
-
The new class but not its members. There's no way to get the members if you return a real class.
-
It's just a bit of a composition hazard that goes away if you can manage to subclass instead of hiding.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.