@umbraco-cms/backoffice
    Preparing search index...

    Function observationAsPromise

    • Function

      observationAsPromise

      Type Parameters

      • T

      Parameters

      • observable: Observable<T>

        an Array of Observables to use for this combined observation.

      • condition: (value: T) => Promise<undefined | boolean>

        a method which should return true or false, if rejected or returning undefined the observation will result in a rejected Promise.

      Returns Promise<T>

      • Returns a Promise which resolves when the condition returns true or rejects when the condition returns undefined or is rejecting it self.
      • Observes an Observable and returns a Promise that resolves when the condition returns true. If the condition returns undefined or rejects, the Promise will reject with the current value.