(fn: (injector: Injector) => FirebasePerformance)
| 29 | } |
| 30 | |
| 31 | export function performanceInstanceFactory(fn: (injector: Injector) => FirebasePerformance) { |
| 32 | // eslint-disable-next-line @typescript-eslint/ban-types |
| 33 | return (zone: NgZone, platform: Object, injector: Injector) => { |
| 34 | if (!isPlatformBrowser(platform)) { return null; } |
| 35 | const performance = zone.runOutsideAngular(() => fn(injector)); |
| 36 | return new Performance(performance); |
| 37 | }; |
| 38 | } |
| 39 | |
| 40 | const PERFORMANCE_INSTANCES_PROVIDER = { |
| 41 | provide: PerformanceInstances, |
no test coverage detected