Remove custom timeout utility

This commit is contained in:
guerler
2023-11-21 09:47:10 +03:00
parent 5948224c54
commit adefcb2989
-7
View File
@@ -1,7 +0,0 @@
let timeoutHandler: ReturnType<typeof setTimeout> | null = null;
export const timeout = (callback: () => void, delay = 5000) => {
if (timeoutHandler) {
clearTimeout(timeoutHandler);
}
timeoutHandler = setTimeout(callback, delay);
};