proposal-mixins icon indicating copy to clipboard operation
proposal-mixins copied to clipboard

A template for ECMAScript proposals

Results 14 proposal-mixins issues
Sort by recently updated
recently updated
newest added

# Why? The current way of creating mixins allows passing arguments. ```js let MyMixin = (superclass, arg1, arg2) => class extends superclass { constructor(...args) { super(...args) this.arg1 = arg1; this.arg2...

``` mixin X {} mixin Y extends X {} mixin Z extends X {} class A with X, X, Y, Z {} ``` It could actually happen for multi using...

``` mixin Z { constructor (z) {} } mixin Y { constructor (y) {} } mixin X extends Y, Z { constructor (x) { super('y,z'); } } class B {...

This post has been updated to try and re-word it in a clearer way. I see that this proposal is jumping through some hoops in order to make it expose...

The inheritance-based approach to mixins has some odd side-effects: - It's a little unclear how multiple mixins ought to work - It's impossible to use mixins to build up a...

It might be useful to know what mixins are applied to a class or object. ```js // Usually, you'll call this one of two ways: // 1. `Object.getMixins(Object.getPrototypeOf(instance))` // 2....

It'd be great if a feature at the language level includes a way to call (or rename) properties or methods that have the same name in different mixins applied to...

As currently defined via desugaring to subclass factories, computed property keys are evaluated for each application: ```js mixin M { [(console.log('a'), 'a')]() { /* ... */ } } class A...

In the readme there is a short section about applying multiple mixins: >Applying multiple mixins in one class declaration will be common, so we could offer special syntax for a...

I think this example could be added to the description: Given: ```js class Z extends A with B, C {} ``` Does it mean ```js class Z extends C(B(A)) {}...