Currently, the exo class creation functions fail to handle non-enumerable raw methods correctly.
At
|
const { constructor: _, ...methods } = behaviorMethods; |
the code uses ... destructuring to take apart a collection of raw methods. But ... destructuring only gathers enumerable own methods.
At
the code uses ... to add the raw methods into a larger collection of methods. But ... only extracts enumerable own methods.
So far, all raw methods arguments to the exo makers formed the collection of raw methods using an object literal, so all the methods were enumerable-own anyway. However, this code is intended to support use of a JavaScript class' .prototype as a collection of raw methods. These two flaws prevent that.
Currently, the exo class creation functions fail to handle non-enumerable raw methods correctly.
At
endo/packages/exo/src/exo-tools.js
Line 291 in 877be98
the code uses
...destructuring to take apart a collection of raw methods. But...destructuring only gathers enumerable own methods.At
endo/packages/exo/src/exo-tools.js
Line 268 in 877be98
the code uses
...to add the raw methods into a larger collection of methods. But...only extracts enumerable own methods.So far, all raw methods arguments to the exo makers formed the collection of raw methods using an object literal, so all the methods were enumerable-own anyway. However, this code is intended to support use of a JavaScript class'
.prototypeas a collection of raw methods. These two flaws prevent that.