diff --git a/index.d.ts b/index.d.ts index 9429799..4204a51 100644 --- a/index.d.ts +++ b/index.d.ts @@ -292,7 +292,7 @@ declare class Emittery< static mixin( emitteryPropertyName: string | symbol, methodNames?: readonly string[] - ): (klass: T) => T; // eslint-disable-line @typescript-eslint/prefer-function-type + ): (klass: T) => T; // eslint-disable-line @typescript-eslint/prefer-function-type /** Subscribe to one or more events. diff --git a/index.test-d.ts b/index.test-d.ts index 2bd77fa..7b28577 100644 --- a/index.test-d.ts +++ b/index.test-d.ts @@ -279,3 +279,8 @@ type AnyListener = (eventData?: unknown) => void | Promise; Emittery.mixin('emittery')(class { test() {} }); + +// Mixin type - arguments in constructor +Emittery.mixin('emittery')(class { // eslint-disable-line @typescript-eslint/no-extraneous-class + constructor(argument: string) {} // eslint-disable-line @typescript-eslint/no-useless-constructor +});