let MyEventEmitterMixin = (eventEmitter) => class extends eventEmitter {};
export class aThing2 extends mix(aThing).with(MyEventEmitterMixin) {}
var at2 = new aThing2();
at2.sizzle();
//sizzle!
at2.addListener('sizzling', function() {console.log( "zzz";)} );
//Uncaught TypeError: at2.addListener is not a function
So, what I am doing wrong or what should the library be doing differently? Thanks!
I educated myself further about es6 classes. I now understand that I need to write my own methods in my mixin, and thereby benefit from the inheritance supers which are thereby made available.
Trying to get your library to work and could use some help.
I have an existing object.
I want to add the functionality of an eventemitter library ( https://github.com/Olical/EventEmitter ) to an instance of aThing.
I tried the following:
So, what I am doing wrong or what should the library be doing differently? Thanks!