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/registry/@denotest/globals | |
| parent | 0e1a71fec6fff5fe62d7e6b2bfffb7ab877d7b71 (diff) | |
feat(unstable/npm): initial type checking of npm specifiers (#16332)
Diffstat (limited to 'cli/tests/testdata/npm/registry/@denotest/globals')
3 files changed, 16 insertions, 1 deletions
diff --git a/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.d.ts b/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.d.ts new file mode 100644 index 000000000..ee03712dd --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.d.ts @@ -0,0 +1,13 @@ +declare const tempGlobalThis: typeof globalThis; +declare const tempGlobal: typeof global; +declare const tempProcess: typeof process; +export { + tempGlobalThis as globalThis, + tempGlobal as global, + tempProcess as process, +}; + +type AssertTrue<T extends true> = never; +type _TestHasProcessGlobal = AssertTrue< + typeof globalThis extends { process: any } ? true : false +>; diff --git a/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.js b/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.js index be5e6e5ac..50d2d3d2a 100644 --- a/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.js +++ b/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.js @@ -1,2 +1,3 @@ exports.globalThis = globalThis; exports.global = global; +exports.process = process; diff --git a/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/package.json b/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/package.json index cba0742c1..1ce42ded4 100644 --- a/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/package.json +++ b/cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/package.json @@ -1,4 +1,5 @@ { "name": "@denotest/globals", - "version": "1.0.0" + "version": "1.0.0", + "types": "index.d.ts" } |
