Clean up globals
Summary: This diff is some boyscouting on cleaning up our globals, and stop using them inconsistently icmw global or window Reviewed By: aigoncharov Differential Revision: D33171108 fbshipit-source-id: 400893e5f31523631a7ab6fda428524c751901f1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c42c54f69d
commit
cea7be7fde
@@ -29,12 +29,6 @@ import type {Icon, RenderHost} from 'flipper-ui-core';
|
||||
import {getLocalIconUrl} from '../utils/icons';
|
||||
import {getCPUUsage} from 'process';
|
||||
|
||||
declare const electronRequire: {
|
||||
(name: string): any;
|
||||
resolve: (module: string) => string;
|
||||
cache: {[module: string]: any};
|
||||
};
|
||||
|
||||
export function initializeElectron(
|
||||
flipperServer: FlipperServer,
|
||||
flipperServerConfig: FlipperServerConfig,
|
||||
@@ -64,7 +58,7 @@ export function initializeElectron(
|
||||
}
|
||||
}
|
||||
|
||||
window.FlipperRenderHostInstance = {
|
||||
FlipperRenderHostInstance = {
|
||||
processId: remote.process.pid,
|
||||
isProduction,
|
||||
readTextFromClipboard() {
|
||||
|
||||
@@ -42,20 +42,6 @@ import fs from 'fs';
|
||||
|
||||
enableMapSet();
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
// We store this as a global, to make sure the renderHost is available
|
||||
// before flipper-ui-core is loaded and needs those during module initialisation
|
||||
FlipperRenderHostInstance: RenderHost;
|
||||
}
|
||||
}
|
||||
|
||||
declare const electronRequire: {
|
||||
(name: string): any;
|
||||
resolve: (module: string) => string;
|
||||
cache: {[module: string]: any};
|
||||
};
|
||||
|
||||
if (process.env.NODE_ENV === 'development' && os.platform() === 'darwin') {
|
||||
// By default Node.JS has its internal certificate storage and doesn't use
|
||||
// the system store. Because of this, it's impossible to access ondemand / devserver
|
||||
|
||||
Reference in New Issue
Block a user