1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
denoland-deno/cli/tests/testdata/npm/compare_globals/main.ts

14 lines
503 B
TypeScript

/// <reference types="npm:@types/node" />
import * as globals from "npm:@denotest/globals";
console.log(globals.global === globals.globalThis);
console.log(globals.process.execArgv);
type AssertTrue<T extends true> = never;
type _TestNoProcessGlobal = AssertTrue<
typeof globalThis extends { process: any } ? false : true
>;
type _TestHasNodeJsGlobal = NodeJS.Architecture;
const controller = new AbortController();
controller.abort("reason"); // in the NodeJS declaration it doesn't have a reason