Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit d5bb602

Browse files
PimmSkn0tt
andauthored
fix: narrow type of BaseHandler (#308)
Removed the synchronous version from the union that is the return type of BaseHandler. Co-authored-by: Simon Knott <info@simonknott.de>
1 parent 2c9edc6 commit d5bb602

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/function/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface HandlerCallback<ResponseType extends Response = Response> {
88
}
99

1010
export interface BaseHandler<ResponseType extends Response = Response, C extends Context = Context> {
11-
(event: Event, context: C, callback?: HandlerCallback<ResponseType>): void | ResponseType | Promise<ResponseType>
11+
(event: Event, context: C, callback?: HandlerCallback<ResponseType>): void | Promise<ResponseType>
1212
}
1313

1414
export type Handler = BaseHandler<Response, Context>

0 commit comments

Comments
 (0)