Skip to content

Commit

Permalink
fix: debounce return type (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Yano committed Jul 1, 2021
1 parent 3da5d17 commit 5811909
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/func/func.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function debounce(
callback: Function,
wait: number,
immediate?: boolean
): Function {
): () => void {
let timeOutId: undefined | number;

// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down Expand Up @@ -85,7 +85,7 @@ export function debounce(
* @param wait The amount to wait in ms.
* @tested
*/
export function throttle(callback: Function, wait: number): Function {
export function throttle(callback: Function, wait: number): () => void {
return func.debounce(callback, wait, true);
}

Expand Down

0 comments on commit 5811909

Please sign in to comment.