summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/js/lib.deno.shared_globals.d.ts8
-rw-r--r--cli/js/web/timers.ts3
-rw-r--r--std/node/timers.ts6
3 files changed, 10 insertions, 7 deletions
diff --git a/cli/js/lib.deno.shared_globals.d.ts b/cli/js/lib.deno.shared_globals.d.ts
index 617a75fea..8f3160e5d 100644
--- a/cli/js/lib.deno.shared_globals.d.ts
+++ b/cli/js/lib.deno.shared_globals.d.ts
@@ -176,16 +176,16 @@ declare namespace WebAssembly {
/** Sets a timer which executes a function once after the timer expires. */
declare function setTimeout(
- cb: (...args: unknown[]) => void,
+ cb: (...args: any[]) => void,
delay?: number,
- ...args: unknown[]
+ ...args: any[]
): number;
/** Repeatedly calls a function , with a fixed time delay between each call. */
declare function setInterval(
- cb: (...args: unknown[]) => void,
+ cb: (...args: any[]) => void,
delay?: number,
- ...args: unknown[]
+ ...args: any[]
): number;
declare function clearTimeout(id?: number): void;
declare function clearInterval(id?: number): void;
diff --git a/cli/js/web/timers.ts b/cli/js/web/timers.ts
index ff18543fa..90b6bba94 100644
--- a/cli/js/web/timers.ts
+++ b/cli/js/web/timers.ts
@@ -179,7 +179,8 @@ function fire(timer: Timer): void {
callback();
}
-export type Args = unknown[];
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+export type Args = any[];
function checkThis(thisArg: unknown): void {
if (thisArg !== null && thisArg !== undefined && thisArg !== globalThis) {
diff --git a/std/node/timers.ts b/std/node/timers.ts
index b942d5fbc..b91985069 100644
--- a/std/node/timers.ts
+++ b/std/node/timers.ts
@@ -5,7 +5,9 @@ export const clearTimeout = window.clearTimeout;
export const setInterval = window.setInterval;
export const clearInterval = window.clearInterval;
export const setImmediate = (
- cb: (...args: unknown[]) => void,
- ...args: unknown[]
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ cb: (...args: any[]) => void,
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ ...args: any[]
): number => window.setTimeout(cb, 0, ...args);
export const clearImmediate = window.clearTimeout;