Skip to content

Type Alias: Middleware ​

ts
type Middleware = (ctx, next) => Promise<AnyResult>;

Defined in: src/client-types.ts:96

Wraps a call. Call next() to continue with the inner middleware and, in the end, the request. next() may be called more than once, as a retry does. Middleware registered first is the outermost.

Parameters ​

ctx ​

AnyCallContext

next ​

() => Promise<AnyResult>

Returns ​

Promise<AnyResult>

Released under the MIT License. An independent library, not made or endorsed by LINE Pay.