Class Primitive

Primitive represents primitive data type including logical clock. It has a type and a value.

Hierarchy

  • CRDTElement
    • Primitive

Constructors

Properties

valueType: PrimitiveType

Methods

  • getPositionedAt returns the time of this element when it was positioned in the document by undo/redo or move operation.

    Returns TimeTicket

  • isRemoved check if this element was removed.

    Returns boolean

  • setMovedAt sets the move time of this element.

    Parameters

    Returns boolean

  • setRemovedAt sets the remove time of this element.

    Parameters

    Returns void

  • toSortedJSON returns the sorted JSON encoding of the value.

    Returns string

  • getPrimitiveType returns the primitive type of the value.

    Parameters

    • value: unknown

    Returns undefined | PrimitiveType

  • isSupport check if the given value is supported type.

    Parameters

    • value: unknown

    Returns boolean