summaryrefslogtreecommitdiff
path: root/cli/js/lib.deno.shared_globals.d.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-04-07 11:12:31 -0400
committerGitHub <noreply@github.com>2020-04-07 11:12:31 -0400
commit62726430bedba7cca4d98e7714f3a8b49db3e89e (patch)
tree587503bcfdaac97088fb204bcfd0fdef44c378f0 /cli/js/lib.deno.shared_globals.d.ts
parent481fcfc8bd291c678d14b20c7c34a925503b8507 (diff)
Remove __timers namespace (#4662)
Diffstat (limited to 'cli/js/lib.deno.shared_globals.d.ts')
-rw-r--r--cli/js/lib.deno.shared_globals.d.ts45
1 files changed, 16 insertions, 29 deletions
diff --git a/cli/js/lib.deno.shared_globals.d.ts b/cli/js/lib.deno.shared_globals.d.ts
index 5fec86311..6c780857a 100644
--- a/cli/js/lib.deno.shared_globals.d.ts
+++ b/cli/js/lib.deno.shared_globals.d.ts
@@ -15,12 +15,7 @@ declare interface WindowOrWorkerGlobalScope {
// methods
atob: typeof __textEncoding.atob;
btoa: typeof __textEncoding.btoa;
- clearInterval: typeof __timers.clearInterval;
- clearTimeout: typeof __timers.clearTimeout;
fetch: typeof __fetch.fetch;
- setInterval: typeof __timers.setInterval;
- queueMicrotask: typeof __timers.queueMicrotask;
- setTimeout: typeof __timers.setTimeout;
// properties
console: __console.Console;
Blob: typeof __blob.DenoBlob;
@@ -228,12 +223,23 @@ declare namespace WebAssembly {
declare const atob: typeof __textEncoding.atob;
declare const btoa: typeof __textEncoding.btoa;
-declare const clearInterval: typeof __timers.clearInterval;
-declare const clearTimeout: typeof __timers.clearTimeout;
declare const fetch: typeof __fetch.fetch;
-declare const setInterval: typeof __timers.setInterval;
-declare const setTimeout: typeof __timers.setTimeout;
-declare const queueMicrotask: typeof __timers.queueMicrotask;
+
+/** Sets a timer which executes a function once after the timer expires. */
+declare function setTimeout(
+ cb: (...args: unknown[]) => void,
+ delay?: number,
+ ...args: unknown[]
+): number;
+/** Repeatedly calls a function , with a fixed time delay between each call. */
+declare function setInterval(
+ cb: (...args: unknown[]) => void,
+ delay?: number,
+ ...args: unknown[]
+): number;
+declare function clearTimeout(id?: number): void;
+declare function clearInterval(id?: number): void;
+declare function queueMicrotask(func: Function): void;
declare const console: __console.Console;
declare const Blob: typeof __blob.DenoBlob;
@@ -1400,25 +1406,6 @@ declare namespace __textEncoding {
}
}
-declare namespace __timers {
- export type Args = unknown[];
- /** Sets a timer which executes a function once after the timer expires. */
- export function setTimeout(
- cb: (...args: Args) => void,
- delay?: number,
- ...args: Args
- ): number;
- /** Repeatedly calls a function , with a fixed time delay between each call. */
- export function setInterval(
- cb: (...args: Args) => void,
- delay?: number,
- ...args: Args
- ): number;
- export function clearTimeout(id?: number): void;
- export function clearInterval(id?: number): void;
- export function queueMicrotask(func: Function): void;
-}
-
declare namespace __urlSearchParams {
export class URLSearchParams {
constructor(init?: string | string[][] | Record<string, string>);