Luxar Viewer API Documentation - v2026.10.19
    Preparing search index...
    • Await a promise SHARED between callers while letting each caller give up on its own signal.

      A single-flight fetch (one in-flight promise many callers join) must not run under any one caller's signal: a superseded first caller would abort the work every joiner is waiting on. The shared work runs under its owner's lifetime signal instead, and each caller waits through this helper, which rejects with the caller's abort reason the moment that caller's signal fires while leaving the shared promise untouched.

      Rejects synchronously-ish (on the next microtask) for an already-aborted signal, and detaches its listener once the shared promise settles, so a long-lived signal does not accumulate listeners across waits.

      Type Parameters

      • T

      Parameters

      • shared: Promise<T>
      • Optionalsignal: AbortSignal | null

      Returns Promise<T>