RunWithRequestContainerOptions · Node.js API
type RunWithRequestContainerOptions<TResult> = object;Options for running work inside an AsyncLocalStorage-backed child container.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
|
|
Properties
Section titled “Properties”providers?
Section titled “providers?”readonly optional providers?: readonly Provider[];Extra providers registered only for this request container.
readonly run: (container) => TResult | Promise<TResult>;Work that runs inside the current async request scope. Await all work that
reads the request container before this callback settles. Deferred work,
such as a Next.js after callback, must enter a fresh request scope.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”TResult | Promise<TResult>