You mean Object.assign to Foo.prototype?
```
class Foo { ... }
Object.assign(Foo.prototype, {
bar, /* Existing method */
additionalMethod() { ... }, /* New method */
});
```
If I’m not wrong, methods added like this are enumerable.
> On Feb 20, 2015, at 5:21 PM, Leon Arnott <[email protected]> wrote:
>
> What would specifically be available with this new syntax that couldn't be
> done with:
>
> ```
> class Foo { ... }
>
> Object.assign(Foo, {
> bar, /* Existing method */
> additionalMethod() { ... }, /* New method */
> });
> ```
>
> apart from, of course, the `super` binding?
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss