Skip to content

Commit

Permalink
Merge pull request #327 from andree-parakey/middleware-type
Browse files Browse the repository at this point in the history
fix: correct types for route middleware functions
  • Loading branch information
icebob authored Jul 11, 2023
2 parents f375dbb + a5af802 commit d95870e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,11 @@ declare module "moleculer-web" {
(deferToNext: "route"): void;
}

type routeMiddleware = (req: IncomingMessage, res: ServerResponse, next: NextFunction) => void;
type routeMiddleware = (req: IncomingRequest, res: GatewayResponse, next: NextFunction) => void;
type routeMiddlewareError = (
err: any,
req: IncomingMessage,
res: ServerResponse,
req: IncomingRequest,
res: GatewayResponse,
next: NextFunction,
) => void;

Expand Down

0 comments on commit d95870e

Please sign in to comment.