pure
    Preparing search index...

    Function scopedCapture

    • Execute an async closure fn, and guarantee that obj will not be garbage-collected, until the promise is resolved.

      Type Parameters

      • T

      Parameters

      • fn: () => Promise<T>
      • obj: unknown

      Returns Promise<T>