declare type Mixin = { prototype: any; }; export interface MixinConfig { mixin: T; omit?: (keyof T['prototype'])[]; pick?: (keyof T['prototype'])[]; copyConstructor?: boolean; } /** * Add mixins to prototype * @example * abstract class MixinClass1 { * sayHello() { return 'hi' } * } * * abstract class MixinClass2 { * sayGoodbye() { return 'goodbye' } * ignoredMethod() { return true } * } * * interface MainClass extends MixinClass1, Omit {} * * // The following line should be un-commented. It is only commented to preserve JSDoc * // @mixin(MixinClass1, { mixin: MixinClass2, omit: [ 'ignoredMethod' ] }) * class MainClass { * init() { console.log( * this.sayHello(), * this.sayGoodbye(), * `ignoredMethod is: ${this.ignoredMethod}` // Should say undefined * ); } * } */ export declare function mixin(...mixin: (Mixin | MixinConfig)[]): (ctor: Function) => void; export {};