mirror of
https://github.com/denoland/deno.git
synced 2025-02-08 07:16:56 -05:00
feat: add queueMicrotask to d.ts (#4477)
This commit is contained in:
parent
30bcf6a2ea
commit
07fc95acee
2 changed files with 7 additions and 1 deletions
4
cli/js/lib.deno.shared_globals.d.ts
vendored
4
cli/js/lib.deno.shared_globals.d.ts
vendored
|
@ -18,8 +18,8 @@ declare interface WindowOrWorkerGlobalScope {
|
||||||
clearInterval: typeof __timers.clearInterval;
|
clearInterval: typeof __timers.clearInterval;
|
||||||
clearTimeout: typeof __timers.clearTimeout;
|
clearTimeout: typeof __timers.clearTimeout;
|
||||||
fetch: typeof __fetch.fetch;
|
fetch: typeof __fetch.fetch;
|
||||||
queueMicrotask: (task: () => void) => void;
|
|
||||||
setInterval: typeof __timers.setInterval;
|
setInterval: typeof __timers.setInterval;
|
||||||
|
queueMicrotask: typeof __timers.queueMicrotask;
|
||||||
setTimeout: typeof __timers.setTimeout;
|
setTimeout: typeof __timers.setTimeout;
|
||||||
// properties
|
// properties
|
||||||
console: __console.Console;
|
console: __console.Console;
|
||||||
|
@ -232,6 +232,7 @@ declare const clearTimeout: typeof __timers.clearTimeout;
|
||||||
declare const fetch: typeof __fetch.fetch;
|
declare const fetch: typeof __fetch.fetch;
|
||||||
declare const setInterval: typeof __timers.setInterval;
|
declare const setInterval: typeof __timers.setInterval;
|
||||||
declare const setTimeout: typeof __timers.setTimeout;
|
declare const setTimeout: typeof __timers.setTimeout;
|
||||||
|
declare const queueMicrotask: typeof __timers.queueMicrotask;
|
||||||
|
|
||||||
declare const console: __console.Console;
|
declare const console: __console.Console;
|
||||||
declare const Blob: typeof __blob.DenoBlob;
|
declare const Blob: typeof __blob.DenoBlob;
|
||||||
|
@ -1327,6 +1328,7 @@ declare namespace __timers {
|
||||||
): number;
|
): number;
|
||||||
export function clearTimeout(id?: number): void;
|
export function clearTimeout(id?: number): void;
|
||||||
export function clearInterval(id?: number): void;
|
export function clearInterval(id?: number): void;
|
||||||
|
export function queueMicrotask(func: Function): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare namespace __urlSearchParams {
|
declare namespace __urlSearchParams {
|
||||||
|
|
|
@ -362,3 +362,7 @@ unitTest(async function timerNestedMicrotaskOrdering(): Promise<void> {
|
||||||
await promise;
|
await promise;
|
||||||
assertEquals(s, "0123456789AB");
|
assertEquals(s, "0123456789AB");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
unitTest(function testQueueMicrotask() {
|
||||||
|
assertEquals(typeof queueMicrotask, "function");
|
||||||
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue