@bodil/signal
    Preparing search index...

    Function asyncComputed

    • Experimental

      Construct a new Signal.Computed signal using an async computation function.

      This returns a promise which will resolve to a Signal.Computed signal once the promise returned by the computation function resolves, and will update itself whenever subsequent calls to the computation function resolve.

      The function is provided with an AbortSignal which any async jobs started from it should abide by. If a signal dependency changes while the job is running, the AbortSignal will be triggered and the job restarted.

      Type Parameters

      • A

      Parameters

      Returns Promise<Computed<A>>