import { FirebaseApp as IFirebaseApp , getApps } from 'firebase/app' ; import { from , timer } from 'rxjs' ; import { concatMap , distinct } from 'rxjs/operators' ; export interface FirebaseApp extends IFirebaseApp { } export class FirebaseApp { constructor ( app ) { return app ; } } export interface FirebaseApps extends Array < IFirebaseApp > { } export class FirebaseApps { constructor ( ) { return getApps ( ) ; } } export const firebaseApp$ = timer ( 0 , 300 ) . pipe ( concatMap ( ( ) => from ( getApps ( ) ) ) , distinct ( ) ) ;