Skip to content

Commit

Permalink
🏷️ useBus deps array is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Asaki-M authored May 24, 2022
1 parent f025dea commit 55e10bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ declare module "use-bus" {
export function dispatch(name: string): void;
export function dispatch(event: EventAction): void;

export default function useBus(name: string, callback: (event: EventAction) => void, deps: any[]): typeof dispatch;
export default function useBus(name: string[], callback: (event: EventAction) => void, deps: any[]): typeof dispatch;
export default function useBus(name: RegExp, callback: (event: EventAction) => void, deps: any[]): typeof dispatch;
export default function useBus(filter: (event: EventAction) => boolean, callback: (event: EventAction) => void, deps: any[]): typeof dispatch;
export default function useBus(name: string, callback: (event: EventAction) => void, deps?: any[]): typeof dispatch;
export default function useBus(name: string[], callback: (event: EventAction) => void, deps?: any[]): typeof dispatch;
export default function useBus(name: RegExp, callback: (event: EventAction) => void, deps?: any[]): typeof dispatch;
export default function useBus(filter: (event: EventAction) => boolean, callback: (event: EventAction) => void, deps?: any[]): typeof dispatch;
}

0 comments on commit 55e10bf

Please sign in to comment.