Skip to content

Commit

Permalink
Merge pull request #120 from SW13-Monstera/hotfix/0122/1
Browse files Browse the repository at this point in the history
🚑 Fix setTimeout type
  • Loading branch information
Kim-Hyunjo authored Jan 21, 2024
2 parents 839e7d6 + 26170c0 commit 3a545cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/service/src/utils/debounce.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
let timerId: number | undefined;
let timerId: number | ReturnType<typeof setTimeout>;

export const debounce = (func: (value: string) => void, value: string, delay: number) => {
clearTimeout(timerId);
timerId = setTimeout(() => {
timerId = window.setTimeout(() => {
func(value);
}, delay);
};

0 comments on commit 3a545cb

Please sign in to comment.