diff options
author | Liam Murphy <43807659+Liamolucko@users.noreply.github.com> | 2020-12-06 02:16:07 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-05 16:16:07 +0100 |
commit | 362be01abe572d68b34e31b361addb860841115b (patch) | |
tree | d60ba3cfac9bfd05a912c4934de84d065ac48a77 /std/node/global.d.ts | |
parent | d72310f139661263fdb4d77c3e311130ac23d971 (diff) |
feat(std/node): Add "setImmediate" and "clearImmediate" to global scope (#8566)
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'std/node/global.d.ts')
-rw-r--r-- | std/node/global.d.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/std/node/global.d.ts b/std/node/global.d.ts index b02a682c6..6e0378b9e 100644 --- a/std/node/global.d.ts +++ b/std/node/global.d.ts @@ -1,6 +1,7 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { process as processModule } from "./process.ts"; import { Buffer as bufferModule } from "./buffer.ts"; +import timers from "./timers.ts"; // d.ts files allow us to declare Buffer as a value and as a type // type something = Buffer | something_else; is quite common @@ -8,6 +9,8 @@ import { Buffer as bufferModule } from "./buffer.ts"; type GlobalType = { process: typeof processModule; Buffer: typeof bufferModule; + setImmediate: typeof timers.setImmediate; + clearImmediate: typeof timers.clearImmediate; }; declare global { @@ -23,6 +26,8 @@ declare global { var process: typeof processModule; var Buffer: typeof bufferModule; type Buffer = bufferModule; + var setImmediate: typeof timers.setImmediate; + var clearImmediate: typeof timers.clearImmediate; } export {}; |