Summary: Electron/Node.js does not garbage collects unloaded modules by default. Need to cleanup require.cache to fully unload them. Reviewed By: passy Differential Revision: D25545962 fbshipit-source-id: 4dce32f39e22adcd2b4f5a55853551379e786e7b
25 lines
566 B
TypeScript
25 lines
566 B
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
declare module NodeJS {
|
|
interface Global {
|
|
__REVISION__: string | undefined;
|
|
__VERSION__: string;
|
|
electronRequire: {
|
|
(name: string): any;
|
|
resolve: (module: string) => string;
|
|
cache: {[module: string]: any};
|
|
};
|
|
window: Window | undefined;
|
|
WebSocket: any;
|
|
fetch: any;
|
|
originalConsole: Console | undefined;
|
|
}
|
|
}
|