Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "asyncComputed"

Index

Functions

Functions

asyncComputed

  • asyncComputed<T>(init: T, delay: number, compute: () => T | PromiseLike<T>, name?: undefined | string): PromisedComputedValue<T>
  • Composition of promisedComputed and throttledComputed, so performs conversion of a promised value into a plain value and also waits for the specified minimum delay before launching a new promise in response to changes.

    Type parameters

    • T

    Parameters

    • init: T

      Value to assume until the promise first resolves

    • delay: number

      Minimum time to wait between creating new promises

    • compute: () => T | PromiseLike<T>

      Evaluates to a promised or plain value

        • (): T | PromiseLike<T>
        • Returns T | PromiseLike<T>

    • Optional name: undefined | string

      (optional) For MobX debug purposes

    Returns PromisedComputedValue<T>

Generated using TypeDoc