mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
fix: use static Reflect methods in nodeGlobalThis proxy (#17696)
Co-authored-by: David Sherret <dsherret@gmail.com>
This commit is contained in:
parent
286e5d0be9
commit
ef9b66950f
5 changed files with 50 additions and 32 deletions
|
@ -11,3 +11,5 @@ type AssertTrue<T extends true> = never;
|
|||
type _TestHasProcessGlobal = AssertTrue<
|
||||
typeof globalThis extends { process: any } ? true : false
|
||||
>;
|
||||
|
||||
export function withNodeGlobalThis(action: (global: typeof globalThis) => void): void;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
exports.globalThis = globalThis;
|
||||
exports.global = global;
|
||||
exports.process = process;
|
||||
|
||||
exports.withNodeGlobalThis = function (action) {
|
||||
action(globalThis);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue