mirror of
https://github.com/denoland/deno.git
synced 2024-11-14 16:33:45 -05:00
b686907a45
This commit adds automatic injection of Node globals when "--compat" flag is present. This is done by executing "https://deno.land/std/node/global.ts" as a "side module", before main module is executed. This commit makes "--compat" required to be used with "--unstable" flag, as some of Node globals require unstable Deno APIs.
8 lines
178 B
TypeScript
8 lines
178 B
TypeScript
if (global != window) {
|
|
throw new Error("global is not equal to window");
|
|
}
|
|
|
|
console.log(process);
|
|
console.log(Buffer);
|
|
console.log(setImmediate);
|
|
console.log(clearImmediate);
|