From 99ca3dfc181f418507e01cf87aa8b02489b9a1d9 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Fri, 14 Jun 2024 10:33:48 +0200 Subject: [PATCH] Update index.d.ts Signed-off-by: Julius Marminge --- types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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