Taking over the next function limits the ability to use middleware that requires passing the next function, which is the case with some functions in bitgo's common library.
|
export type MiddlewareFn<T extends {}> = ( |
|
req: express.Request, |
|
res: express.Response, |
|
) => Promise<T>; |