Preserve previous error messages

Reviewed By: passy

Differential Revision: D51197113

fbshipit-source-id: 237c6f1f894cb4d758150ff2bddf14c104d3b381
This commit is contained in:
Andrey Goncharov
2023-11-10 03:39:32 -08:00
committed by Facebook GitHub Bot
parent 8348d617d0
commit 4b3f572205
6 changed files with 53 additions and 13 deletions

View File

@@ -30,11 +30,11 @@ export type {FlipperServer, FlipperServerCommands, FlipperServerExecOptions};
export function createFlipperServer(
host: string,
port: number,
tokenProvider: () => Promise<string | null | undefined>,
tokenProvider: () => string | null | undefined,
onStateChange: (state: FlipperServerState) => void,
): Promise<FlipperServer> {
const URLProvider = async () => {
const token = await tokenProvider();
const URLProvider = () => {
const token = tokenProvider();
return `ws://${host}:${port}?token=${token}`;
};