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:
Michel Weststrate
2021-12-17 10:02:57 -08:00
committed by Facebook GitHub Bot
parent c42c54f69d
commit cea7be7fde
13 changed files with 13 additions and 47 deletions

View File

@@ -17,8 +17,6 @@ declare global {
debug: boolean;
};
FlipperRenderHostInstance: RenderHost;
flipperShowError?(error: string): void;
flipperHideError?(): void;
}

View File

@@ -15,7 +15,7 @@ document.getElementById('root')!.innerText = 'flipper-ui-browser started';
async function start() {
// @ts-ignore
(global as any).electronRequire = function (path: string) {
electronRequire = function (path: string) {
console.error(
`[decapitate] Tried to electronRequire ${path}, this module is not available in the browser and will be stubbed`,
);

View File

@@ -14,7 +14,7 @@ export function initializeRenderHost(
flipperServer: FlipperServer,
flipperServerConfig: FlipperServerConfig,
) {
window.FlipperRenderHostInstance = {
FlipperRenderHostInstance = {
readTextFromClipboard() {
// TODO:
return undefined;