Definition mixins

Raul-Sebastian Mihăilă raul.mihaila at gmail.com
Sun Nov 5 14:51:01 UTC 2017


Also, in the same context, for different mixin associated objects there
will be different mix objects:

```js
function F() {
  const obj = {};
  const obj2 = {};

  mixin obj, mixin1;
  mixin obj2, mixin2;
}

function mixin1() {
  return (obj, mix) => {};
}

function mixin2() {
  return (obj, mix) => {};
}
```

The mix argument that the mixin function created by mixin2 receives will be
different from the one received by the mixin function created by mixin1
because obj1 !== obj2.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20171105/1709ac84/attachment-0001.html>


More information about the es-discuss mailing list