Skip to content

Commit e51beb5

Browse files
committed
chore(demo): fix incorrect type use
1 parent a46aeb2 commit e51beb5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

examples/vite/src/AppSettings/ActionsMenu/WebSocketEventPromptDialog/websocketEventAutomation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
import type { SimulationState, SimulationUser } from './types';
99

1010
type JsonObject = Record<string, unknown>;
11+
type HandleEventArgument = Parameters<StreamChat['handleEvent']>[0];
1112

1213
const messageTextFragments = [
1314
'debug event payload',
@@ -521,7 +522,7 @@ export const emitWebSocketEventPayload = ({
521522

522523
client.handleEvent({
523524
data: JSON.stringify(emittedPayload),
524-
} as WebSocket.MessageEvent);
525+
} as HandleEventArgument);
525526

526527
trackSimulationStateFromPayload({
527528
payload: emittedPayload,

0 commit comments

Comments
 (0)