two classes reference each other javascript code example
Example 1: mixin in javascript mdn
let calculatorMixin = Base => class extends Base {
calc() { }
};
let randomizerMixin = Base => class extends Base {
randomize() { }
};
Example 2: mixin in javascript mdn
class Foo { }
class Bar extends calculatorMixin(randomizerMixin(Foo)) { }