1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00
denoland-deno/tests/specs/run/unstable/node_globals.ts
Marvin Hagemeister de34c7ed29
feat(cli): add --unstable-node-globals flag (#26617)
This PR adds a new `--unstable-node-globals` flag to expose Node globals
by default.

Fixes https://github.com/denoland/deno/issues/26611

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-14 13:11:29 +00:00

7 lines
347 B
TypeScript

import * as nodeBuffer from "node:buffer";
import * as nodeTimers from "node:timers";
console.log(`global: ${globalThis === global}`);
console.log(`Buffer: ${Buffer === nodeBuffer.default}`);
console.log(`setImmediate: ${setImmediate === nodeTimers.setImmediate}`);
console.log(`clearImmediate: ${clearImmediate === nodeTimers.clearImmediate}`);