From ef9b66950f4557003bc7d4246da838545466a518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Og=C3=B3rek?= Date: Thu, 9 Feb 2023 01:11:12 +0100 Subject: fix: use static Reflect methods in nodeGlobalThis proxy (#17696) Co-authored-by: David Sherret --- cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.d.ts | 2 ++ cli/tests/testdata/npm/registry/@denotest/globals/1.0.0/index.js | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'cli/tests/testdata/npm/registry/@denotest') 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 index ee03712dd..3f3eeb92a 100644 --- 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 @@ -11,3 +11,5 @@ type AssertTrue = never; type _TestHasProcessGlobal = AssertTrue< typeof globalThis extends { process: any } ? true : false >; + +export function withNodeGlobalThis(action: (global: typeof globalThis) => void): void; 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 50d2d3d2a..daac83c66 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,3 +1,7 @@ exports.globalThis = globalThis; exports.global = global; exports.process = process; + +exports.withNodeGlobalThis = function (action) { + action(globalThis); +}; -- cgit v1.2.3