Documentation
    Preparing search index...

    Function withScope

    • Create a short-lived scope, run a function, and auto-dispose on exit.

      Type Parameters

      • T

      Parameters

      • fn: (s: Scope) => T | Promise<T>

        Function that runs within a temporary scope.

      • Optionalopts: { label?: string; parent?: Scope }

        Optional label or parent for the scope.

      Returns Promise<T>

      The result of the callback.