Sign up (with export icon)

NoOperation

Api-class icon class

Operation which is doing nothing ("empty operation", "do-nothing operation", "noop"). This is an operation, which when executed does not change the tree model. It still has some parameters defined for transformation purposes.

In most cases this operation is a result of transforming operations. When transformation returns NoOperation it means that changes done by the transformed operation have already been applied.

Properties

Static properties

  • Chevron-right icon

    className : string
    readonlystatic

    Name of the operation class used for serialization.

Methods

  • Chevron-right icon

    constructor( baseVersion )
    inherited

    Base operation constructor.

    Parameters

    baseVersion : null | number

    Document version on which operation can be applied or null if the operation operates on detached (non-document) tree.

  • Chevron-right icon

    Creates and returns an operation that has the same parameters as this operation.

    Returns

    NoOperation
  • Chevron-right icon

  • Chevron-right icon

    toJSON() → unknown
    inherited

    Custom toJSON method to solve child-parent circular dependencies.

    Returns

    unknown

    Clone of this object with the operation property replaced with string.

  • Chevron-right icon

    _execute() → void
    internal

  • Chevron-right icon

    _validate() → void
    internalinherited

    Checks whether the operation's parameters are correct and the operation can be correctly executed. Throws an error if operation is not valid.

    Returns

    void

Static methods

  • Chevron-right icon

    fromJSON( json, document ) → Operation
    inheritedstatic

    Creates Operation object from deserialized object, i.e. from parsed JSON string.

    Parameters

    json : any

    Deserialized JSON object.

    document : ModelDocument

    Document on which this operation will be applied.

    Returns

    Operation