Options
All
  • Public
  • Public/Protected
  • All
Menu

@sensenet/client-utils

Index

Type aliases

ValueChangeCallback

ValueChangeCallback<T>: function

Callback type for observable value changes

Type parameters

  • T

Type declaration

    • (next: T): void
    • Parameters

      • next: T

      Returns void

Functions

Const using

  • using<T, TReturns>(resource: T, callback: function): TReturns
  • Method that accepts an IDisposable resource that will be disposed after the callback

    Type parameters

    Parameters

    • resource: T

      The resource that is used in the callback and will be disposed afterwards

    • callback: function

      The callback that will be executed synchrounously before the resource will be disposed

        • (resource: T): TReturns
        • Parameters

          • resource: T

          Returns TReturns

    Returns TReturns

Const usingAsync

  • usingAsync<T, TReturns>(resource: T, callback: function): Promise<TReturns>
  • Method that accepts an IDisposable resource that will be disposed after the callback

    Type parameters

    Parameters

    • resource: T

      The resource that is used in the callback and will be disposed afterwards

    • callback: function

      The callback that will be executed asynchrounously before the resource will be disposed

        • (resource: T): Promise<TReturns>
        • Parameters

          • resource: T

          Returns Promise<TReturns>

    Returns Promise<TReturns>

Generated using TypeDoc