diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2022-10-21 11:20:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-21 15:20:18 +0000 |
| commit | bcfe279fba865763c87f9cd8d5a2d0b2cbf451be (patch) | |
| tree | 68e4d1bc52e261df50279f9ecea14795d1c46f6c /cli/tests/testdata/npm/compare_globals/main.ts | |
| parent | 0e1a71fec6fff5fe62d7e6b2bfffb7ab877d7b71 (diff) | |
feat(unstable/npm): initial type checking of npm specifiers (#16332)
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 |
