Skip to content
providerkit
GitHub

parseChatEvent

function parseChatEvent(value): ChatEvent | null;

Defined in: react/src/protocol.ts:778

Checks one value from the wire and returns the event it describes, or null.

null covers three cases, and all three mean “apply nothing”: another protocol version, a known event that is malformed, and an event type this version does not know. The last is skipped and not an error, so an older client keeps working against a newer host.

Parameter Type
value unknown

ChatEvent | null