electric icon indicating copy to clipboard operation
electric copied to clipboard

Message type doesn't allow discriminating between a ControlMessage and ChangeMessage at the type level.

Open samwillis opened this issue 7 months ago • 0 comments

The code below is unable to discriminate that the message is a ChangeMessage:

if (message.headers.action === "insert") {
  // message is still ControlMessage | ChangeMessage
}

It would be nice if there was a way to discriminate them without having to manually use as

samwillis avatar Jul 23 '24 10:07 samwillis