Skip to content

Commit

Permalink
chore(): Optimize imports - remove unused, organize alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
NothingEverHappens committed Apr 28, 2020
1 parent 18d0c03 commit 949c496
Show file tree
Hide file tree
Showing 71 changed files with 192 additions and 238 deletions.
2 changes: 1 addition & 1 deletion sample/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { RouterModule, Routes } from '@angular/router';


const routes: Routes = [];
Expand Down
2 changes: 1 addition & 1 deletion sample/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TestBed, async } from '@angular/core/testing';
import { async, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';

Expand Down
2 changes: 1 addition & 1 deletion sample/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, ApplicationRef } from '@angular/core';
import { ApplicationRef, Component } from '@angular/core';
import { FirebaseApp } from '@angular/fire';

@Component({
Expand Down
4 changes: 2 additions & 2 deletions sample/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BrowserModule, BrowserTransferStateModule } from '@angular/platform-browser';
import { NgModule, isDevMode } from '@angular/core';
import { isDevMode, NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
Expand All @@ -9,7 +9,7 @@ import { environment } from '../environments/environment';
import { AngularFireModule } from '@angular/fire';
import { AngularFireStorageModule } from '@angular/fire/storage';

import { AngularFireAnalyticsModule, UserTrackingService, ScreenTrackingService, DEBUG_MODE as ANALYTICS_DEBUG_MODE } from '@angular/fire/analytics';
import { AngularFireAnalyticsModule, DEBUG_MODE as ANALYTICS_DEBUG_MODE, ScreenTrackingService, UserTrackingService } from '@angular/fire/analytics';

import { FirestoreComponent } from './firestore/firestore.component';

Expand Down
2 changes: 1 addition & 1 deletion sample/src/app/database/database.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { AngularFireDatabase } from '@angular/fire/database';
import { Observable } from 'rxjs';
import { TransferState, makeStateKey } from '@angular/platform-browser';
import { makeStateKey, TransferState } from '@angular/platform-browser';
import { startWith, tap } from 'rxjs/operators';
import { trace } from '@angular/fire/performance';

Expand Down
4 changes: 2 additions & 2 deletions sample/src/app/firestore/firestore.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { AngularFirestore } from '@angular/fire/firestore';
import { Observable } from 'rxjs';
import { tap, startWith } from 'rxjs/operators';
import { TransferState, makeStateKey } from '@angular/platform-browser';
import { startWith, tap } from 'rxjs/operators';
import { makeStateKey, TransferState } from '@angular/platform-browser';
import { trace } from '@angular/fire/performance';

@Component({
Expand Down
2 changes: 1 addition & 1 deletion sample/src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ export const environment = {
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
import 'zone.js/dist/zone-error'; // Included with Angular CLI.
import 'zone.js/dist/zone-error'; // Included with Angular CLI.
2 changes: 1 addition & 1 deletion sample/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import 'zone.js/dist/zone'; // Included with Angular CLI.


/***************************************************************************************************
Expand Down
5 changes: 1 addition & 4 deletions sample/src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing';

declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
Expand Down
2 changes: 1 addition & 1 deletion src/analytics/analytics.module.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NgModule, Optional } from '@angular/core';
import { UserTrackingService, ScreenTrackingService } from './analytics.service';
import { ScreenTrackingService, UserTrackingService } from './analytics.service';
import { AngularFireAnalytics } from './analytics';

@NgModule({
Expand Down
8 changes: 4 additions & 4 deletions src/analytics/analytics.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable, Optional, NgZone, OnDestroy, ComponentFactoryResolver, Inject, PLATFORM_ID, Injector, NgModuleFactory } from '@angular/core';
import { Subscription, from, Observable, of } from 'rxjs';
import { filter, withLatestFrom, switchMap, map, tap, pairwise, startWith, groupBy, mergeMap, observeOn } from 'rxjs/operators';
import { Router, NavigationEnd, ActivationEnd, ROUTES } from '@angular/router';
import { ComponentFactoryResolver, Inject, Injectable, Injector, NgModuleFactory, NgZone, OnDestroy, Optional, PLATFORM_ID } from '@angular/core';
import { from, Observable, of, Subscription } from 'rxjs';
import { filter, groupBy, map, mergeMap, observeOn, pairwise, startWith, switchMap, tap, withLatestFrom } from 'rxjs/operators';
import { ActivationEnd, NavigationEnd, Router, ROUTES } from '@angular/router';
import { ɵAngularFireSchedulers } from '@angular/fire';
import { AngularFireAnalytics, DEBUG_MODE } from './analytics';
import { User } from 'firebase/app';
Expand Down
6 changes: 3 additions & 3 deletions src/analytics/analytics.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TestBed, inject } from '@angular/core/testing';
import { FirebaseApp, FIREBASE_OPTIONS, AngularFireModule, FIREBASE_APP_NAME } from '@angular/fire';
import { AngularFireAnalytics, AngularFireAnalyticsModule, COLLECTION_ENABLED, APP_VERSION, APP_NAME } from './public_api';
import { inject, TestBed } from '@angular/core/testing';
import { AngularFireModule, FirebaseApp } from '@angular/fire';
import { AngularFireAnalytics, AngularFireAnalyticsModule } from './public_api';
import { COMMON_CONFIG } from '../test-config';
import { rando } from '../firestore/utils.spec';

Expand Down
8 changes: 4 additions & 4 deletions src/analytics/analytics.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Injectable, Inject, Optional, NgZone, InjectionToken, PLATFORM_ID } from '@angular/core';
import { of, empty, Observable } from 'rxjs';
import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';
import { empty, Observable, of } from 'rxjs';
import { isPlatformBrowser } from '@angular/common';
import { map, tap, shareReplay, switchMap, observeOn } from 'rxjs/operators';
import { FirebaseAppConfig, FirebaseOptions, ɵAngularFireSchedulers, ɵlazySDKProxy, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵfirebaseAppFactory, ɵPromiseProxy } from '@angular/fire';
import { map, observeOn, shareReplay, switchMap, tap } from 'rxjs/operators';
import { FIREBASE_APP_NAME, FIREBASE_OPTIONS, FirebaseAppConfig, FirebaseOptions, ɵAngularFireSchedulers, ɵfirebaseAppFactory, ɵlazySDKProxy, ɵPromiseProxy } from '@angular/fire';
import { analytics } from 'firebase';

export interface Config {[key: string]: any; }
Expand Down
8 changes: 4 additions & 4 deletions src/auth-guard/auth-guard.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { TestBed, inject } from '@angular/core/testing';
import { FirebaseApp, AngularFireModule } from '@angular/fire';
import { inject, TestBed } from '@angular/core/testing';
import { AngularFireModule, FirebaseApp } from '@angular/fire';
import { COMMON_CONFIG } from '../test-config';
import { AngularFireAuthGuardModule, AngularFireAuthGuard } from './public_api';
import { RouterModule, Router } from '@angular/router';
import { AngularFireAuthGuard, AngularFireAuthGuardModule } from './public_api';
import { Router, RouterModule } from '@angular/router';
import { APP_BASE_HREF } from '@angular/common';
import { rando } from '../firestore/utils.spec';

Expand Down
8 changes: 4 additions & 4 deletions src/auth-guard/auth-guard.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Injectable, Inject, Optional, NgZone } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';
import { Inject, Injectable, NgZone, Optional } from '@angular/core';
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from '@angular/router';
import { Observable, of, pipe, UnaryFunction } from 'rxjs';
import { map, switchMap, take, observeOn, shareReplay } from 'rxjs/operators';
import { map, observeOn, shareReplay, switchMap, take } from 'rxjs/operators';
import { User } from 'firebase/app';
import { ɵAngularFireSchedulers, FirebaseOptions, FirebaseAppConfig, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵfirebaseAppFactory } from '@angular/fire';
import { FIREBASE_APP_NAME, FIREBASE_OPTIONS, FirebaseAppConfig, FirebaseOptions, ɵAngularFireSchedulers, ɵfirebaseAppFactory } from '@angular/fire';

export type AuthPipeGenerator = (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => AuthPipe;
export type AuthPipe = UnaryFunction<Observable<User|null>, Observable<boolean|any[]>>;
Expand Down
6 changes: 3 additions & 3 deletions src/auth/auth.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { User } from 'firebase/app';
import { Observable, Subject } from 'rxjs';
import { TestBed, inject } from '@angular/core/testing';
import { FirebaseApp, FIREBASE_OPTIONS, AngularFireModule, FIREBASE_APP_NAME } from '@angular/fire';
import { inject, TestBed } from '@angular/core/testing';
import { AngularFireModule, FIREBASE_APP_NAME, FIREBASE_OPTIONS, FirebaseApp } from '@angular/fire';
import { AngularFireAuth, AngularFireAuthModule } from './public_api';
import { COMMON_CONFIG } from '../test-config';
import { take, skip } from 'rxjs/operators';
import { skip, take } from 'rxjs/operators';
import 'firebase/auth';
import { rando } from '../firestore/utils.spec';

Expand Down
20 changes: 15 additions & 5 deletions src/auth/auth.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
import { Injectable, Inject, Optional, NgZone, PLATFORM_ID } from '@angular/core';
import { Observable, of, from } from 'rxjs';
import { switchMap, map, observeOn, shareReplay } from 'rxjs/operators';
import { FIREBASE_OPTIONS, FIREBASE_APP_NAME, FirebaseOptions, FirebaseAppConfig, ɵPromiseProxy, ɵlazySDKProxy, ɵfirebaseAppFactory, ɵAngularFireSchedulers, ɵkeepUnstableUntilFirstFactory } from '@angular/fire';
import { User, auth } from 'firebase/app';
import { Inject, Injectable, NgZone, Optional, PLATFORM_ID } from '@angular/core';
import { from, Observable, of } from 'rxjs';
import { map, observeOn, shareReplay, switchMap } from 'rxjs/operators';
import {
FIREBASE_APP_NAME,
FIREBASE_OPTIONS,
FirebaseAppConfig,
FirebaseOptions,
ɵAngularFireSchedulers,
ɵfirebaseAppFactory,
ɵkeepUnstableUntilFirstFactory,
ɵlazySDKProxy,
ɵPromiseProxy
} from '@angular/fire';
import { auth, User } from 'firebase/app';

export interface AngularFireAuth extends ɵPromiseProxy<auth.Auth> {}

Expand Down
12 changes: 6 additions & 6 deletions src/core/angularfire2.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { TestBed, inject } from '@angular/core/testing';
import { PlatformRef, NgModule, CompilerFactory, NgZone } from '@angular/core';
import { FirebaseApp, AngularFireModule } from './public_api';
import { Subscription, Observable, Subject, of } from 'rxjs';
import { inject, TestBed } from '@angular/core/testing';
import { CompilerFactory, NgModule, NgZone, PlatformRef } from '@angular/core';
import { AngularFireModule, FirebaseApp } from './public_api';
import { Observable, of, Subject, Subscription } from 'rxjs';
import { COMMON_CONFIG } from '../test-config';
import { BrowserModule } from '@angular/platform-browser';
import { database } from 'firebase/app';
import { ɵZoneScheduler, ɵkeepUnstableUntilFirstFactory, ɵAngularFireSchedulers } from './angularfire2';
import { ɵAngularFireSchedulers, ɵkeepUnstableUntilFirstFactory, ɵZoneScheduler } from './angularfire2';
import { ɵPLATFORM_BROWSER_ID, ɵPLATFORM_SERVER_ID } from '@angular/common';
import { tap } from 'rxjs/operators';
import { tap } from 'rxjs/operators';
import { TestScheduler } from 'rxjs/testing';
import { rando } from '../firestore/utils.spec';

Expand Down
4 changes: 2 additions & 2 deletions src/core/angularfire2.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgZone } from '@angular/core';
import { Observable, Subscription, SchedulerLike, SchedulerAction, queueScheduler, Operator, Subscriber, TeardownLogic, asyncScheduler } from 'rxjs';
import { subscribeOn, observeOn, tap } from 'rxjs/operators';
import { asyncScheduler, Observable, Operator, queueScheduler, SchedulerAction, SchedulerLike, Subscriber, Subscription, TeardownLogic } from 'rxjs';
import { observeOn, subscribeOn, tap } from 'rxjs/operators';

function noop() { }

Expand Down
4 changes: 2 additions & 2 deletions src/core/firebase.app.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { InjectionToken, NgModule, Optional, NgZone, VERSION as NG_VERSION, Version, PLATFORM_ID, Inject } from '@angular/core';
import { app, auth, database, messaging, storage, firestore, functions, analytics, performance, remoteConfig } from 'firebase/app';
import { Inject, InjectionToken, NgModule, NgZone, Optional, PLATFORM_ID, VERSION as NG_VERSION, Version } from '@angular/core';
import * as firebase from 'firebase/app';
import { analytics, app, auth, database, firestore, functions, messaging, performance, remoteConfig, storage } from 'firebase/app';

// INVESTIGATE Public types don't expose FirebaseOptions or FirebaseAppConfig, is this the case anylonger?
export interface FirebaseOptions {[key: string]: any; }
Expand Down
4 changes: 2 additions & 2 deletions src/database/database.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FirebaseApp, AngularFireModule, FIREBASE_OPTIONS, FIREBASE_APP_NAME } from '@angular/fire';
import { AngularFireModule, FIREBASE_APP_NAME, FIREBASE_OPTIONS, FirebaseApp } from '@angular/fire';
import { AngularFireDatabase, AngularFireDatabaseModule, URL } from './public_api';
import { TestBed, inject } from '@angular/core/testing';
import { inject, TestBed } from '@angular/core/testing';
import { COMMON_CONFIG } from '../test-config';
import { NgZone } from '@angular/core';
import 'firebase/database';
Expand Down
6 changes: 3 additions & 3 deletions src/database/database.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Injectable, Inject, Optional, NgZone, PLATFORM_ID, InjectionToken } from '@angular/core';
import { DatabaseQuery, PathReference, QueryFn, AngularFireList, AngularFireObject } from './interfaces';
import { Inject, Injectable, InjectionToken, NgZone, Optional, PLATFORM_ID } from '@angular/core';
import { AngularFireList, AngularFireObject, DatabaseQuery, PathReference, QueryFn } from './interfaces';
import { getRef } from './utils';
import { createListReference } from './list/create-reference';
import { createObjectReference } from './object/create-reference';
import { FirebaseOptions, FirebaseAppConfig, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵfirebaseAppFactory, ɵkeepUnstableUntilFirstFactory, ɵAngularFireSchedulers } from '@angular/fire';
import { FIREBASE_APP_NAME, FIREBASE_OPTIONS, FirebaseAppConfig, FirebaseOptions, ɵAngularFireSchedulers, ɵfirebaseAppFactory, ɵkeepUnstableUntilFirstFactory } from '@angular/fire';
import { Observable } from 'rxjs';
import { database } from 'firebase/app';
import 'firebase/database';
Expand Down
4 changes: 2 additions & 2 deletions src/database/list/audit-trail.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DatabaseReference } from '../interfaces';
import { FirebaseApp, AngularFireModule } from '@angular/fire';
import { AngularFireModule, FirebaseApp } from '@angular/fire';
import { AngularFireDatabase, AngularFireDatabaseModule, auditTrail, ChildEvent, URL } from '../public_api';
import { TestBed, inject } from '@angular/core/testing';
import { inject, TestBed } from '@angular/core/testing';
import { COMMON_CONFIG } from '../../test-config';
import { skip } from 'rxjs/operators';
import 'firebase/database';
Expand Down
4 changes: 2 additions & 2 deletions src/database/list/audit-trail.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { DataSnapshot, DatabaseQuery, ChildEvent, DatabaseSnapshot, AngularFireAction, SnapshotAction } from '../interfaces';
import { AngularFireAction, ChildEvent, DatabaseQuery, DataSnapshot, SnapshotAction } from '../interfaces';
import { stateChanges } from './state-changes';
import { Observable, SchedulerLike } from 'rxjs';
import { fromRef } from '../observable/fromRef';

import { skipWhile, withLatestFrom, map, scan } from 'rxjs/operators';
import { map, scan, skipWhile, withLatestFrom } from 'rxjs/operators';

export function auditTrail<T>(query: DatabaseQuery, events?: ChildEvent[], scheduler?: SchedulerLike): Observable<SnapshotAction<T>[]> {
const auditTrail$ = stateChanges<T>(query, events)
Expand Down
6 changes: 3 additions & 3 deletions src/database/list/changes.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { database } from 'firebase/app';
import { FirebaseApp, AngularFireModule } from '@angular/fire';
import { AngularFireModule, FirebaseApp } from '@angular/fire';
import { AngularFireDatabase, AngularFireDatabaseModule, listChanges, URL } from '../public_api';
import { TestBed, inject } from '@angular/core/testing';
import { inject, TestBed } from '@angular/core/testing';
import { COMMON_CONFIG } from '../../test-config';
import { skip, take, tap } from 'rxjs/operators';
import { skip, take } from 'rxjs/operators';
import 'firebase/database';
import { rando } from '../../firestore/utils.spec';

Expand Down
6 changes: 3 additions & 3 deletions src/database/list/changes.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { fromRef } from '../observable/fromRef';
import { Observable, of, merge, SchedulerLike } from 'rxjs';
import { merge, Observable, of, SchedulerLike } from 'rxjs';

import { DatabaseQuery, ChildEvent, SnapshotAction } from '../interfaces';
import { ChildEvent, DatabaseQuery, SnapshotAction } from '../interfaces';
import { isNil } from '../utils';

import { switchMap, distinctUntilChanged, scan } from 'rxjs/operators';
import { distinctUntilChanged, scan, switchMap } from 'rxjs/operators';

export function listChanges<T= any>(ref: DatabaseQuery, events: ChildEvent[], scheduler?: SchedulerLike): Observable<SnapshotAction<T>[]> {
return fromRef(ref, 'value', 'once', scheduler).pipe(
Expand Down
2 changes: 1 addition & 1 deletion src/database/list/create-reference.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DatabaseQuery, AngularFireList, ChildEvent } from '../interfaces';
import { AngularFireList, ChildEvent, DatabaseQuery } from '../interfaces';
import { snapshotChanges } from './snapshot-changes';
import { stateChanges } from './state-changes';
import { auditTrail } from './audit-trail';
Expand Down
3 changes: 1 addition & 2 deletions src/database/list/data-operation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

import { DatabaseReference, FirebaseOperation, DatabaseSnapshot } from '../interfaces';
import { DatabaseReference, DatabaseSnapshot, FirebaseOperation } from '../interfaces';
import { checkOperationCases } from '../utils';

export function createDataOperationMethod<T>(ref: DatabaseReference, operation: string) {
Expand Down
3 changes: 1 addition & 2 deletions src/database/list/remove.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { DatabaseReference, DataSnapshot, FirebaseOperation, DatabaseSnapshot } from '../interfaces';
import { DatabaseReference, DatabaseSnapshot, FirebaseOperation } from '../interfaces';
import { checkOperationCases } from '../utils';
import { database } from 'firebase/app';

// TODO(davideast): Find out why TS thinks this returns firebase.Primise
// instead of Promise.
Expand Down
8 changes: 4 additions & 4 deletions src/database/list/snapshot-changes.spec.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { database } from 'firebase/app';
import { FirebaseApp, AngularFireModule } from '@angular/fire';
import { AngularFireDatabase, AngularFireDatabaseModule, snapshotChanges, ChildEvent, URL } from '../public_api';
import { TestBed, inject } from '@angular/core/testing';
import { AngularFireModule, FirebaseApp } from '@angular/fire';
import { AngularFireDatabase, AngularFireDatabaseModule, ChildEvent, snapshotChanges, URL } from '../public_api';
import { inject, TestBed } from '@angular/core/testing';
import { COMMON_CONFIG } from '../../test-config';
import { BehaviorSubject } from 'rxjs';
import { skip, take, switchMap } from 'rxjs/operators';
import { skip, switchMap, take } from 'rxjs/operators';
import 'firebase/database';
import { rando } from '../../firestore/utils.spec';

Expand Down
2 changes: 1 addition & 1 deletion src/database/list/snapshot-changes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Observable, SchedulerLike } from 'rxjs';
import { listChanges } from './changes';
import { DatabaseQuery, ChildEvent, SnapshotAction } from '../interfaces';
import { ChildEvent, DatabaseQuery, SnapshotAction } from '../interfaces';
import { validateEventsArray } from './utils';

export function snapshotChanges<T>(query: DatabaseQuery, events?: ChildEvent[], scheduler?: SchedulerLike): Observable<SnapshotAction<T>[]> {
Expand Down
6 changes: 3 additions & 3 deletions src/database/list/state-changes.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { database } from 'firebase/app';
import { FirebaseApp, AngularFireModule } from '@angular/fire';
import { AngularFireDatabase, AngularFireDatabaseModule, stateChanges, ChildEvent, URL } from '../public_api';
import { TestBed, inject } from '@angular/core/testing';
import { AngularFireModule, FirebaseApp } from '@angular/fire';
import { AngularFireDatabase, AngularFireDatabaseModule, ChildEvent, stateChanges, URL } from '../public_api';
import { inject, TestBed } from '@angular/core/testing';
import { COMMON_CONFIG } from '../../test-config';
import { skip } from 'rxjs/operators';
import 'firebase/database';
Expand Down
5 changes: 2 additions & 3 deletions src/database/list/state-changes.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { DatabaseQuery, ChildEvent, AngularFireAction, SnapshotAction } from '../interfaces';
import { ChildEvent, DatabaseQuery } from '../interfaces';
import { fromRef } from '../observable/fromRef';
import { validateEventsArray } from './utils';
import { SchedulerLike, Observable, merge } from 'rxjs';
import { DatabaseSnapshot } from '../interfaces';
import { merge, SchedulerLike } from 'rxjs';

export function stateChanges<T>(query: DatabaseQuery, events?: ChildEvent[], scheduler?: SchedulerLike) {
events = validateEventsArray(events)!;
Expand Down
Loading

0 comments on commit 949c496

Please sign in to comment.