Variable ClientMessageSchemaConst
ClientMessageSchema: ZodDiscriminatedUnion<
[
ZodObject<
{ data: ZodUnknown; to: ZodString; type: ZodLiteral<"signal"> },
$strip,
>,
ZodObject<{ type: ZodLiteral<"pong"> }, $strip>,
ZodObject<
{
channel: ZodString;
data: ZodOptional<ZodUnknown>;
type: ZodLiteral<"broadcast">;
},
$strip,
>,
],
"type",
> = ...
Zod schema validating messages sent by clients to the server. A parsed value is a ClientMessage: a directed
signal, a heartbeatpong, or abroadcast. Malformed inbound messages are rejected and surface as PeerEvent.Error.