diff --git a/types/index.d.ts b/types/index.d.ts index eec1559..30347bf 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -27,8 +27,8 @@ declare namespace fastifyMiddie { query?: any; } export type NextFunction = (err?: any) => void; - export type SimpleHandleFunction = (req: http.IncomingMessage & IncomingMessageExtended, res: http.ServerResponse) => void; - export type NextHandleFunction = (req: connect.IncomingMessage & IncomingMessageExtended, res: http.ServerResponse, next: NextFunction) => void; + export type SimpleHandleFunction = (req: http.IncomingMessage & IncomingMessageExtended, res: http.ServerResponse) => void | Promise; + export type NextHandleFunction = (req: connect.IncomingMessage & IncomingMessageExtended, res: http.ServerResponse, next: NextFunction) => void | Promise; export type Handler = SimpleHandleFunction | NextHandleFunction