Declares methods for executing transactions on the document.

2.0

interface ITransactions {
    Cast<T1, T2>(this: T2, type: TypeRef<T1>): T1;
    ExecuteInvisibleTransaction(action: Action): void;
    ExecuteStickyTransaction(guid: Guid, action: Action): void;
    ExecuteTransaction(action: Action): void;
    TryCast<T1, T2>(this: T2, type: TypeRef<T1>): null | T1;
}

Hierarchy (view full)

Methods

  • Casts this object to the specified type. Throws error on failure.

    Type Parameters

    • T1

      The target type of the cast.

    • T2

      The type of the object to cast.

    Parameters

    Returns T1

  • Casts this object to the specified type. Returns null on failure.

    Type Parameters

    • T1

      The target type of the cast.

    • T2

      The type of the object to cast.

    Parameters

    Returns null | T1

Default capability

  • Starts an invisible transaction on the document model by executing action.

    Parameters

    • action: Action

      The delegate to execute.

    Returns void

    This API expects that the script is declared with 'wrapInTransaction' set to 'false' to work as documented.

    2.0

  • Starts a sticky transaction on the document model by executing action.

    Parameters

    • guid: Guid

      The id which identifies the transactions which should stick together.

    • action: Action

      The delegate to execute.

    Returns void

    This API expects that the script is declared with 'wrapInTransaction' set to 'false' to work as documented.

    2.0

  • Starts a transaction on the document model by executing action.

    Parameters

    • action: Action

      The delegate to execute.

    Returns void

    This API expects that the script is declared with 'wrapInTransaction' set to 'false' to work as documented.

    2.0