1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-20 04:36:16 -05:00
denoland-deno/tests/node_compat/polyfill_globals.js

21 lines
604 B
JavaScript
Raw Normal View History

2025-01-01 04:12:39 +09:00
// Copyright 2018-2025 the Deno authors. MIT license.
import { Buffer } from "node:buffer";
import {
clearImmediate,
clearInterval,
clearTimeout,
setImmediate,
setInterval,
setTimeout,
} from "node:timers";
import { performance } from "node:perf_hooks";
globalThis.Buffer = Buffer;
globalThis.clearImmediate = clearImmediate;
globalThis.clearInterval = clearInterval;
globalThis.clearTimeout = clearTimeout;
globalThis.global = globalThis;
globalThis.performance = performance;
globalThis.setImmediate = setImmediate;
globalThis.setInterval = setInterval;
globalThis.setTimeout = setTimeout;