MiddlewareLikeObj: {
    after?: MiddlewareFn<TEvent, TResult, TErr, TContext>;
    before?: MiddlewareFn<TEvent, TResult, TErr, TContext>;
    onError?: MiddlewareFn<TEvent, TResult, TErr, TContext>;
}

This type represents the shape of a middleware object that can be passed to the use method of a Middy-like middleware.

Type Parameters

  • TEvent = unknown
  • TResult = unknown
  • TErr = Error
  • TContext extends Context = Context

Type declaration