@yorkie-js/sdk
    Preparing search index...

    Type Alias SDKToPanelMessage

    SDKToPanelMessage:
        | { msg: "refresh-devtools" }
        | { docKey: string; msg: "doc::available" }
        | { docKey: string; events: DocEventsForReplay[]; msg: "doc::sync::full" }
        | { docKey: string; event: DocEventsForReplay; msg: "doc::sync::partial" }
        | {
            docKey: string;
            msg: "doc::notification::full";
            notifications: DocNotification[];
        }
        | {
            docKey: string;
            msg: "doc::notification::partial";
            notification: DocNotification;
        }

    Definition of all messages the SDK can send to the Devtools panel.

    Type Declaration

    • { msg: "refresh-devtools" }

      Sent when the dev panel is already opened and listened, before the sdk is loaded. If the panel receives this message, it will replay its initial "connect" message.

    • { docKey: string; msg: "doc::available" }

      Sent when the document is available for the panel to watch.

    • { docKey: string; events: DocEventsForReplay[]; msg: "doc::sync::full" }

      Sent initially, to synchronize the entire current state of the document.

    • { docKey: string; event: DocEventsForReplay; msg: "doc::sync::partial" }

      Sent whenever the document is changed.

    • {
          docKey: string;
          msg: "doc::notification::full";
          notifications: DocNotification[];
      }

      Sent initially, to hand over the notifications recorded so far. These are the events that cannot be replayed, so they travel beside the replay stream instead of inside it.

    • {
          docKey: string;
          msg: "doc::notification::partial";
          notification: DocNotification;
      }

      Sent whenever an event that cannot be replayed occurs in the document.