summaryrefslogtreecommitdiff
path: root/std/node/global.ts
diff options
context:
space:
mode:
authorLiam Murphy <43807659+Liamolucko@users.noreply.github.com>2020-12-06 02:16:07 +1100
committerGitHub <noreply@github.com>2020-12-05 16:16:07 +0100
commit362be01abe572d68b34e31b361addb860841115b (patch)
treed60ba3cfac9bfd05a912c4934de84d065ac48a77 /std/node/global.ts
parentd72310f139661263fdb4d77c3e311130ac23d971 (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.ts')
-rw-r--r--std/node/global.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/std/node/global.ts b/std/node/global.ts
index d72760089..585ba1490 100644
--- a/std/node/global.ts
+++ b/std/node/global.ts
@@ -2,6 +2,7 @@
/// <reference path="./global.d.ts" />
import { process as processModule } from "./process.ts";
import { Buffer as bufferModule } from "./buffer.ts";
+import timers from "./timers.ts";
Object.defineProperty(globalThis, "global", {
value: globalThis,
@@ -24,4 +25,18 @@ Object.defineProperty(globalThis, "Buffer", {
configurable: true,
});
+Object.defineProperty(globalThis, "setImmediate", {
+ value: timers.setImmediate,
+ enumerable: true,
+ writable: true,
+ configurable: true,
+});
+
+Object.defineProperty(globalThis, "clearImmediate", {
+ value: timers.clearImmediate,
+ enumerable: true,
+ writable: true,
+ configurable: true,
+});
+
export {};