Skip to content

Commit 0ae7c3c

Browse files
p-youngmbleigh
andauthored
Fix onRequest handler return type to allow promises (async) (#705)
Co-authored-by: Michael Bleigh <[email protected]>
1 parent e4f2eba commit 0ae7c3c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/function-builder.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,10 @@ export class FunctionBuilder {
154154
* same signature as an Express app.
155155
*/
156156
onRequest: (
157-
handler: (req: https.Request, resp: express.Response) => void
157+
handler: (
158+
req: https.Request,
159+
resp: express.Response
160+
) => void | Promise<void>
158161
) => https._onRequestWithOptions(handler, this.options),
159162
/**
160163
* Declares a callable method for clients to call using a Firebase SDK.

0 commit comments

Comments
 (0)