From 8440d765d51c0886f45843ad217a6a5dbabd5049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Ga=C5=82kowski?= Date: Fri, 15 May 2020 15:51:49 +0200 Subject: fix: setTimeout and friends have too strict types (#5412) --- cli/js/lib.deno.shared_globals.d.ts | 8 ++++---- cli/js/web/timers.ts | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'cli') 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) { -- cgit v1.2.3