594dc7e24a
* chore: update node types version * update express types to solve type conflict * one more yarn.lock type bump * update another types package to fix incompatible global declarations * remove incompatible type magicks * update our ambient types to match the node types * fix test type
18 lines
682 B
TypeScript
18 lines
682 B
TypeScript
// This file provides the global, process and Buffer variables to internal
|
|
// Electron code once they have been deleted from the global scope.
|
|
//
|
|
// It does this through the ProvidePlugin in the webpack.config.base.js file
|
|
// Check out the Module.wrapper override in renderer/init.ts for more
|
|
// information on how this works and why we need it
|
|
|
|
// Rip global off of window (which is also global) so that webpack doesn't
|
|
// auto replace it with a looped reference to this file
|
|
const _global = typeof globalThis !== 'undefined' ? globalThis.global : (self || window).global;
|
|
const process = _global.process;
|
|
const Buffer = _global.Buffer;
|
|
|
|
export {
|
|
_global,
|
|
process,
|
|
Buffer
|
|
};
|