Skip to content

Commit

Permalink
Fix generic array on Hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Derugon authored Oct 4, 2023
1 parent 7242903 commit 067b9b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mw/hook.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ interface Hook<T extends any[] = any[]> {
* @param {...Function} handler Function to bind.
* @chainable
*/
add(...handler: ((...data: T) => any)[]): this;
add(...handler: Array<(...data: T) => any>): this;

/**
* Run a hook.
Expand All @@ -64,7 +64,7 @@ interface Hook<T extends any[] = any[]> {
* @param {...Function} handler Function to unbind.
* @chainable
*/
remove(...handler: ((...data: T) => any)[]): this;
remove(...handler: Array<(...data: T) => any>): this;
}

declare global {
Expand Down

0 comments on commit 067b9b0

Please sign in to comment.