From bcfe279fba865763c87f9cd8d5a2d0b2cbf451be Mon Sep 17 00:00:00 2001 From: David Sherret Date: Fri, 21 Oct 2022 11:20:18 -0400 Subject: feat(unstable/npm): initial type checking of npm specifiers (#16332) --- cli/tests/testdata/npm/compare_globals/main.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 cli/tests/testdata/npm/compare_globals/main.ts (limited to 'cli/tests/testdata/npm/compare_globals/main.ts') 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 @@ +/// + +import * as globals from "npm:@denotest/globals"; +console.log(globals.global === globals.globalThis); +console.log(globals.process.execArgv); + +type AssertTrue = 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 -- cgit v1.2.3