Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a mutable CRDT RGA that can be set to a specific value when updating a document.

This class can't be instantiated directly, it's returned automatically for any rga property of a document within an update block via MutableDocumentPath.rga.

Hierarchy

Index

Constructors

  • Constructs a new RGA that can be used as part of a document's content.

    Parameters

    • value: any

    Returns MutableRGA

Accessors

  • get value(): any[]
  • Returns the value of the RGA.

    Returns any[]

Methods

  • insertAt(value: any, index: number): void
  • Inserts a value into an the RGA at the index specified.

    Parameters

    • value: any

      The value to insert into the RGA.

    • index: number

      The index at which to insert the provided value.

    Returns void

  • pop(): any
  • Pop a value off the end of the RGA.

    Returns any

    The value popped off from the end of the RGA.

  • push(value: any): void
  • Push a value on to the end of the RGA.

    Parameters

    • value: any

      The value to push on to the RGA.

    Returns void

  • removeAt(index: number): void
  • Remove a value at the specified index.

    Parameters

    • index: number

      The index of the element to remove.

    Returns void

  • setAt(value: any, index: number): void
  • Set a value at the specified index.

    Parameters

    • value: any

      The value to set at the specified index.

    • index: number

      The index at which to set the provided value.

    Returns void