Class SerializedDiff

The SerializedDiff class provides functionality to create and store differences between two TypeScript objects of the same type.

Hierarchy

  • FrameworkObject
    • SerializedDiff

Constructors

  • Parameters

    • OptionalisInternalConstructor: boolean

    Returns SerializedDiff

Accessors

  • get isEmpty(): boolean
  • Returns true if the diff doesn't contain any changes between the two objects.

    Returns boolean

Methods

  • Applies difference stored in this object to the provided object. The type of the object must be the same as the type of objects the difference was generated from.

    Parameters

    • object: any

      Object to apply the difference to.

    Returns void

  • Creates a difference of properties that are different in oldObject compared to oldObject. The difference can later be applied to oldObject to restore it to the same state as newObject .

    Parameters

    • oldObject: any

      Object to compare from.

    • newObject: any

      Object to compare to.

    Returns SerializedDiff

    A set of differences between the two objects.

  • Creates a difference of properties that are different in oldObject compared to oldObject. The difference can later be applied to oldObject to restore it to the same state as newObject.

    Parameters

    Returns SerializedDiff

    A set of differences between the two objects.