import { Analytics as FirebaseAnalytics } from 'firebase/analytics' ; import { ɵgetAllInstancesOf } from '@angular/fire' ; import { from , timer } from 'rxjs' ; import { concatMap , distinct } from 'rxjs/operators' ; export interface Analytics extends FirebaseAnalytics { } export class Analytics { constructor ( analytics ) { return analytics ; } } export const ANALYTICS_PROVIDER_NAME = 'analytics' ; export interface AnalyticsInstances extends Array < FirebaseAnalytics > { } export class AnalyticsInstances { constructor ( ) { return ɵgetAllInstancesOf < FirebaseAnalytics > ( ANALYTICS_PROVIDER_NAME ) ; } } export const analyticInstance$ = timer ( 0 , 300 ) . pipe ( concatMap ( ( ) => from ( ɵgetAllInstancesOf < FirebaseAnalytics > ( ANALYTICS_PROVIDER_NAME ) ) ) , distinct ( ) ) ;