Skip to content

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

+1-1
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)