Class SerializableCommandAbstract

A command that can be serialized to or deserialized from JSON. To allow a command to be deserialized, SerializableCommand.register must be called for each SerializableCommand.

This is used to allow collaborative editing.

Hierarchy (view full)

Constructors

Properties

empty: (Anonymous class) = ...

Methods

  • Convert this command to an object that can be passed to JSON.stringify.

    Do not rely on the stability of the optupt of this function — it can change form without a major version increase.

    Returns Record<string | symbol, any>

  • Register a deserialization callback. This must be called at least once for every subclass of SerializableCommand.

    Parameters

    • commandTypeId: string
    • deserialize: DeserializationCallback

    Returns void

OpenSource licenses