Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revert "Update https types in function builder"
  • Loading branch information
kevinajian authored Jan 9, 2019
commit 237557ddf1f067e5171b1fcd8e4e1eac45702f42
6 changes: 3 additions & 3 deletions src/function-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -156,7 +156,7 @@ export class FunctionBuilder {
data: any,
context: https.CallableContext
) => any | Promise<any>
) => https._onCallWithOpts(handler, this.options),
) => https._onCallWithOpts(handler, this.options) as HttpsFunction,
};
}

Expand Down