From ca3d68e6a0c3b770b0a907767cf8d659a2afbd69 Mon Sep 17 00:00:00 2001 From: DjDeveloperr Date: Thu, 15 Apr 2021 18:08:42 +0530 Subject: [PATCH] feat(deploy): remove unnecessary timer polyfill --- deploy.ts | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/deploy.ts b/deploy.ts index 0bbccf4..ffdc907 100644 --- a/deploy.ts +++ b/deploy.ts @@ -75,23 +75,6 @@ export function handle( client.handle(cmd, handler) } -// Hacky workaround. Timers don't exist in Deploy runtime :( - -if (typeof (window as any).setTimeout !== 'function') { - Object.defineProperty(window, 'setTimeout', { - value: (fn: CallableFunction, _ms: number, ...args: any[]) => { - fn(...args) - return 0 - } - }) -} - -if (typeof (window as any).clearTimeout !== 'function') { - Object.defineProperty(window, 'clearTimeout', { - value: (_id: number) => {} - }) -} - export { commands, client } export * from './src/types/slash.ts' export * from './src/structures/slash.ts'