Skip to content

RunWithRequestContainerOptions · Next.js server API

type RunWithRequestContainerOptions<TResult> = object;

Options for running work inside a fresh explicit child container.

Type Parameter

TResult

readonly optional providers?: readonly Provider[];

Extra providers registered only for this manual request container.


readonly run: (container) => TResult | Promise<TResult>;

Work that owns the request lifecycle. The container is disposed after this callback settles.

Parameter Type

container

Container

TResult | Promise<TResult>