Skip to content

Commit

Permalink
fix(types): enhance reusability of pres
Browse files Browse the repository at this point in the history
Support for pre handlers whose type ref is only a subset of the actual route type ref
  • Loading branch information
IJuanI authored and Marsup committed Mar 13, 2024
1 parent fe6f4fd commit 2766ed2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/types/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ export namespace Lifecycle {
type Method<
Refs extends ReqRef = ReqRefDefaults,
R extends ReturnValue<any> = ReturnValue<Refs>
> = (
> = <RouteRef extends Refs>(
this: MergeRefs<Refs>['Bind'],
request: Request<Refs>,
h: ResponseToolkit<Refs>,
request: Request<RouteRef>,
h: ResponseToolkit<RouteRef>,
err?: Error | undefined
) => R;

Expand Down

0 comments on commit 2766ed2

Please sign in to comment.