File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ import { map } from 'rxjs/operators';
2424type Functions = import ( 'firebase/functions' ) . Functions ;
2525type HttpsCallableOptions = import ( 'firebase/functions' ) . HttpsCallableOptions ;
2626
27- export function httpsCallable < T , R > (
27+ export function httpsCallable < RequestData = unknown , ResponseData = unknown > (
2828 functions : Functions ,
2929 name : string ,
3030 options ?: HttpsCallableOptions ,
31- ) : ( data : T ) => Observable < R > {
32- const callable = vanillaHttpsCallable ( functions , name , options ) ;
33- return ( data : T ) => {
34- return from ( callable ( data ) ) . pipe ( map ( r => r . data as R ) ) ;
31+ ) : ( data ?: RequestData | null ) => Observable < ResponseData > {
32+ const callable = vanillaHttpsCallable < RequestData , ResponseData > ( functions , name , options ) ;
33+ return ( data ) => {
34+ return from ( callable ( data ) ) . pipe ( map ( r => r . data ) ) ;
3535 } ;
3636}
You can’t perform that action at this time.
0 commit comments