import { Functions as FirebaseFunctions } from 'firebase/functions' ; import { ɵgetAllInstancesOf } from '@angular/fire' ; import { from , timer } from 'rxjs' ; import { concatMap , distinct } from 'rxjs/operators' ; export interface Functions extends FirebaseFunctions { } export class Functions { constructor ( functions ) { return functions ; } } export const FUNCTIONS_PROVIDER_NAME = 'functions' ; export interface FunctionsInstances extends Array < FirebaseFunctions > { } export class FunctionsInstances { constructor ( ) { return ɵgetAllInstancesOf < FirebaseFunctions > ( FUNCTIONS_PROVIDER_NAME ) ; } } export const functionInstance$ = timer ( 0 , 300 ) . pipe ( concatMap ( ( ) => from ( ɵgetAllInstancesOf < FirebaseFunctions > ( FUNCTIONS_PROVIDER_NAME ) ) ) , distinct ( ) ) ;