diff --git a/src/function-builder.ts b/src/function-builder.ts index 71c4cda46..80f6086db 100644 --- a/src/function-builder.ts +++ b/src/function-builder.ts @@ -32,7 +32,7 @@ import * as https from './providers/https'; import * as pubsub from './providers/pubsub'; import * as remoteConfig from './providers/remoteConfig'; import * as storage from './providers/storage'; -import { CloudFunction, EventContext } from './cloud-functions'; +import { CloudFunction, EventContext, HttpsFunction } from './cloud-functions'; /** * Configure the regions that the function is deployed to. @@ -146,7 +146,7 @@ export class FunctionBuilder { */ onRequest: ( handler: (req: express.Request, resp: express.Response) => void - ) => https._onRequestWithOpts(handler, this.options), + ) => https._onRequestWithOpts(handler, this.options) as HttpsFunction, /** * Declares a callable method for clients to call using a Firebase SDK. * @param handler A method that takes a data and context and returns a value. @@ -156,7 +156,7 @@ export class FunctionBuilder { data: any, context: https.CallableContext ) => any | Promise - ) => https._onCallWithOpts(handler, this.options), + ) => https._onCallWithOpts(handler, this.options) as HttpsFunction, }; }