Flarum (v2.0.0-beta.4)
    Preparing search index...
    • The mixin utility assigns the properties of a set of 'mixin' objects to the prototype of a parent object.

      Parameters

      • Parent: object

        The class to extend the new class from.

      • ...mixins: Record<string, any>[]

        The objects to mix in.

      Returns object

      A new class that extends Parent and contains the mixins.

      class MyClass extends mixin(ExistingClass, evented, etc) {}