Newer
Older
alert / js / node_modules / flarum / common / utils / mixin.d.ts
@Réz István Réz István on 18 Nov 2021 463 bytes first commit
/**
 * The `mixin` utility assigns the properties of a set of 'mixin' objects to
 * the prototype of a parent object.
 *
 * @example
 * class MyClass extends mixin(ExistingClass, evented, etc) {}
 *
 * @param {Class} Parent The class to extend the new class from.
 * @param {...Object} mixins The objects to mix in.
 * @return {Class} A new class that extends Parent and contains the mixins.
 */
export default function mixin(Parent: any, ...mixins: any[]): any;