diff --git a/desktop/plugins/public/reactdevtools/index.tsx b/desktop/plugins/public/reactdevtools/index.tsx index f6af704f7..80ae93852 100644 --- a/desktop/plugins/public/reactdevtools/index.tsx +++ b/desktop/plugins/public/reactdevtools/index.tsx @@ -237,7 +237,9 @@ export function devicePlugin(client: DevicePluginClient) { // TODO: since devToolsInstance is an instance, we are probably leaking memory here setStatus(ConnectionStatus.Initializing, status); }) - .startServer(DEV_TOOLS_PORT) as any; + .startServer(DEV_TOOLS_PORT, 'localhost', undefined, { + surface: 'flipper', + }); setStatus(ConnectionStatus.Initializing, 'Waiting for device...'); } catch (e) { console.error('Failed to initalize React DevTools' + e); diff --git a/desktop/plugins/public/reactdevtools/react-devtools-core.d.tsx b/desktop/plugins/public/reactdevtools/react-devtools-core.d.tsx index 755fdae9f..cfe8179fd 100644 --- a/desktop/plugins/public/reactdevtools/react-devtools-core.d.tsx +++ b/desktop/plugins/public/reactdevtools/react-devtools-core.d.tsx @@ -7,10 +7,24 @@ * @format */ +type ServerOptions = { + key?: string; + cert?: string; +}; + +type LoggerOptions = { + surface?: string; +}; + declare module 'react-devtools-core/standalone' { interface DevTools { setContentDOMNode(node: HTMLElement): this; - startServer(port: number): this; + startServer( + port?: number, + host?: string, + httpsOptions?: ServerOptions, + loggerOptions?: LoggerOptions, + ): {close: () => void}; setStatusListener(listener: (message: string) => void): this; } const DevTools: DevTools;