The full discriminated union of every message that may cross the bridge.
Both BridgeClient (tutor) and ProtocolDecoder (edge) operate on this type. Narrow with message.type:
BridgeClient
ProtocolDecoder
message.type
switch (message.type) { case BridgeMessageType.STROKE_EVENT: handleStroke(message.stroke); break; // …} Copy
switch (message.type) { case BridgeMessageType.STROKE_EVENT: handleStroke(message.stroke); break; // …}
The full discriminated union of every message that may cross the bridge.
Both
BridgeClient(tutor) andProtocolDecoder(edge) operate on this type. Narrow withmessage.type: