Skip to content

Commit

Permalink
fix: make request and response types explicit (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Aug 7, 2023
1 parent 6c14ff9 commit 3b64c18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/event/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ export function defineEventHandler<
Response = EventHandlerResponse,
>(
handler: EventHandler<
Request extends EventHandlerRequest ? Request : any,
Request extends EventHandlerRequest ? Request : EventHandlerRequest,
Request extends EventHandlerRequest ? Response : Request
>,
): EventHandler<
Request extends EventHandlerRequest ? Request : any,
Request extends EventHandlerRequest ? Request : EventHandlerRequest,
Request extends EventHandlerRequest ? Response : Request
>;
export function defineEventHandler<
Request extends EventHandlerRequest = EventHandlerRequest,
Request extends EventHandlerRequest,
Response = EventHandlerResponse,
>(
handler:
Expand Down

0 comments on commit 3b64c18

Please sign in to comment.