Recover from malformed JSON

Summary: Following up on D34787674 (f85def32fb).

Reviewed By: aigoncharov

Differential Revision: D34930249

fbshipit-source-id: f209a638c1281957fd2b03b6fc50389bd98bc5f6
This commit is contained in:
Pascal Hartig
2022-03-16 16:39:23 -07:00
committed by Facebook GitHub Bot
parent 04235e6086
commit 9c5d1a32c5
2 changed files with 23 additions and 3 deletions

View File

@@ -14,6 +14,11 @@ type GenericWebSocketMessage<E = string, T = unknown> = {
payload: T;
};
export type GenericWebSocketError = GenericWebSocketMessage<
'error',
{message: string}
>;
export type ExecWebSocketMessage = GenericWebSocketMessage<
'exec',
{