diff options
Diffstat (limited to 'cli/tests/testdata/npm/compare_globals/main.ts')
-rw-r--r-- | cli/tests/testdata/npm/compare_globals/main.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cli/tests/testdata/npm/compare_globals/main.ts b/cli/tests/testdata/npm/compare_globals/main.ts new file mode 100644 index 000000000..5710d0bd5 --- /dev/null +++ b/cli/tests/testdata/npm/compare_globals/main.ts @@ -0,0 +1,14 @@ +/// <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 |