Interface MiddlewareOptions<ArgumentT, ReturnT, ContextT>

Input parameter of a middleware.

interface MiddlewareOptions<
    ArgumentT,
    ReturnT,
    ContextT extends MiddlewareContext<ArgumentT>,
> {
    context: ContextT;
    fn: MiddlewareFunction<ArgumentT, ReturnT>;
}

Type Parameters

Properties

Properties

context: ContextT

Context of the execution e.g. the request context or URL.

Initial function enriched by the middleware e.g. axios request getting a timeout.

Copyright Ⓒ 2024 SAP SE or an SAP affiliate company. All rights reserved.