You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin currently mixes the prototypemethods and constructor property (when extending another class) assignments
Object.assign(MyClass.prototype,{myMethod: functionmyMethod(a,b,c){// do things},constructor: MyClass});
Should there be an option (let's call it "explicit") for a more readable format such as
Object.assign(MyClass.prototype,{constructor: MyClass},{myMethod: functionmyMethod(a,b,c){// do things},});
Note that It doesn't have much sense at runtime and reduce a little the performance, but it can be interesting in dev mode, even more if we add support to class properties or even to unofficial traits
ex:
Object.assign(MyClass.prototype,{constructor: MyClass},Trait1,Trait2,{myMethod: functionmyMethod(a,b,c){// do things},});Object.assign(MyClass,{staticProperty: 42,staticProperty2: 51,},{staticMethod: functionstaticMethod(a,b,c){// do things},});
The text was updated successfully, but these errors were encountered:
This plugin currently mixes the
prototype
methods
andconstructor
property (when extending another class) assignmentsShould there be an option (let's call it "explicit") for a more readable format such as
Note that It doesn't have much sense at runtime and reduce a little the performance, but it can be interesting in dev mode, even more if we add support to class properties or even to unofficial traits
ex:
The text was updated successfully, but these errors were encountered: