method IPipelineBehavior.handle
IPipelineBehavior.handle(
request: TRequest,
next: () => Promise<TResult>
): TResult | Promise<TResult>

Wraps the next handler in the pipeline.

Parameters

request: TRequest

The request being handled

next: () => Promise<TResult>

The next handler (or terminal handler)

Return Type

TResult | Promise<TResult>

The result (sync or async)

Usage

import { type IPipelineBehavior } from "common/src/index.ts";