diff --git a/src/functions/functions.ts b/src/functions/functions.ts index f9243172c..69f9ebc0f 100644 --- a/src/functions/functions.ts +++ b/src/functions/functions.ts @@ -14,6 +14,7 @@ import { } from '@angular/fire'; import firebase from 'firebase/app'; import { proxyPolyfillCompat } from './base'; +import { HttpsCallableOptions } from '@firebase/functions-types'; export const ORIGIN = new InjectionToken('angularfire2.functions.origin'); export const REGION = new InjectionToken('angularfire2.functions.region'); @@ -51,10 +52,10 @@ export class AngularFireFunctions { shareReplay({ bufferSize: 1, refCount: false }) ); - this.httpsCallable = (name: string) => + this.httpsCallable = (name: string, options?: HttpsCallableOptions) => (data: T) => from(functions).pipe( observeOn(schedulers.insideAngular), - switchMap(functions => functions.httpsCallable(name)(data)), + switchMap(functions => functions.httpsCallable(name, options)(data)), map(r => r.data as R) );