Setu-TS
    Preparing search index...

    Interface IPipelineBehavior<TRequest, TResult>

    Wraps a handler with cross-cutting logic (logging, timing, validation, etc.).

    Behaviors are typed to CqrsRequest so they can read request.type/request.data type-safely without any.

    0.1.0

    interface IPipelineBehavior<
        TRequest extends CqrsRequest = CqrsRequest,
        TResult = unknown,
    > {
        handle(
            request: TRequest,
            next: () => Promise<TResult>,
        ): TResult | Promise<TResult>;
    }

    Type Parameters

    • TRequest extends CqrsRequest = CqrsRequest

      The request type (must extend CqrsRequest)

    • TResult = unknown

      The result type

    Index