From 2766ed2d940220d983753a66b850e766b1ce02d6 Mon Sep 17 00:00:00 2001 From: Juan Cruz Date: Fri, 27 Oct 2023 23:28:09 -0300 Subject: [PATCH] fix(types): enhance reusability of pres Support for pre handlers whose type ref is only a subset of the actual route type ref --- lib/types/utils.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/types/utils.d.ts b/lib/types/utils.d.ts index 30318d529..88b1ad6ee 100644 --- a/lib/types/utils.d.ts +++ b/lib/types/utils.d.ts @@ -65,10 +65,10 @@ export namespace Lifecycle { type Method< Refs extends ReqRef = ReqRefDefaults, R extends ReturnValue = ReturnValue - > = ( + > = ( this: MergeRefs['Bind'], - request: Request, - h: ResponseToolkit, + request: Request, + h: ResponseToolkit, err?: Error | undefined ) => R;