@@ -32,7 +32,7 @@ import * as https from './providers/https';
3232import * as pubsub from './providers/pubsub' ;
3333import * as remoteConfig from './providers/remoteConfig' ;
3434import * as storage from './providers/storage' ;
35- import { CloudFunction , EventContext } from './cloud-functions' ;
35+ import { CloudFunction , EventContext , HttpsFunction } from './cloud-functions' ;
3636
3737/**
3838 * Configure the regions that the function is deployed to.
@@ -146,7 +146,7 @@ export class FunctionBuilder {
146146 */
147147 onRequest : (
148148 handler : ( req : express . Request , resp : express . Response ) => void
149- ) => https . _onRequestWithOpts ( handler , this . options ) ,
149+ ) => https . _onRequestWithOpts ( handler , this . options ) as HttpsFunction ,
150150 /**
151151 * Declares a callable method for clients to call using a Firebase SDK.
152152 * @param handler A method that takes a data and context and returns a value.
@@ -156,7 +156,7 @@ export class FunctionBuilder {
156156 data : any ,
157157 context : https . CallableContext
158158 ) => any | Promise < any >
159- ) => https . _onCallWithOpts ( handler , this . options ) ,
159+ ) => https . _onCallWithOpts ( handler , this . options ) as HttpsFunction ,
160160 } ;
161161 }
162162
0 commit comments