daffl/uberproto

Uberproto can not extend Babel transpiled ES6 class instances

Closed this issue · 0 comments

daffl commented

The reason is that ES6 class methods are not enumerable in https://github.com/daffl/uberproto/blob/master/lib/proto.js#L44 so the extended object will not contain them. The best way to solve this is probably to add a flag to extend to get all property descriptors of all prototype objects and uses those instead (see http://stackoverflow.com/questions/31054910/get-functions-of-a-class).