@@ -7,7 +7,7 @@ import { AngularFirestoreDocument } from './document/document';
7
7
import { AngularFirestoreCollection } from './collection/collection' ;
8
8
import { AngularFirestoreCollectionGroup } from './collection-group/collection-group' ;
9
9
10
- import { FirebaseFirestore , FirebaseOptions , FirebaseAppConfig , FirebaseOptionsToken , FirebaseNameOrConfigToken , _firebaseAppFactory , FirebaseZoneScheduler } from '@angular/fire' ;
10
+ import { FirebaseFirestore , FirebaseOptions , FirebaseAppConfig , FIREBASE_OPTIONS , FIREBASE_APP_NAME , _firebaseAppFactory , FirebaseZoneScheduler } from '@angular/fire' ;
11
11
import { isPlatformServer } from '@angular/common' ;
12
12
13
13
// Workaround for Nodejs build
@@ -24,6 +24,10 @@ export const EnablePersistenceToken = new InjectionToken<boolean>('angularfire2.
24
24
export const PersistenceSettingsToken = new InjectionToken < PersistenceSettings | undefined > ( 'angularfire2.firestore.persistenceSettings' ) ;
25
25
export const FirestoreSettingsToken = new InjectionToken < Settings > ( 'angularfire2.firestore.settings' ) ;
26
26
27
+ export const ENABLE_PERSISTENCE = EnablePersistenceToken ;
28
+ export const PERSISTENCE_SETTINGS = PersistenceSettingsToken
29
+ export const FIRESTORE_SETTINGS = FirestoreSettingsToken ;
30
+
27
31
// timestampsInSnapshots was depreciated in 5.8.0
28
32
const major = parseInt ( firebase . SDK_VERSION . split ( '.' ) [ 0 ] ) ;
29
33
const minor = parseInt ( firebase . SDK_VERSION . split ( '.' ) [ 1 ] ) ;
@@ -115,13 +119,13 @@ export class AngularFirestore {
115
119
* @param app
116
120
*/
117
121
constructor (
118
- @Inject ( FirebaseOptionsToken ) options :FirebaseOptions ,
119
- @Optional ( ) @Inject ( FirebaseNameOrConfigToken ) nameOrConfig :string | FirebaseAppConfig | null | undefined ,
120
- @Optional ( ) @Inject ( EnablePersistenceToken ) shouldEnablePersistence : boolean | null ,
121
- @Optional ( ) @Inject ( FirestoreSettingsToken ) settings : Settings | null ,
122
+ @Inject ( FIREBASE_OPTIONS ) options :FirebaseOptions ,
123
+ @Optional ( ) @Inject ( FIREBASE_APP_NAME ) nameOrConfig :string | FirebaseAppConfig | null | undefined ,
124
+ @Optional ( ) @Inject ( ENABLE_PERSISTENCE ) shouldEnablePersistence : boolean | null ,
125
+ @Optional ( ) @Inject ( FIRESTORE_SETTINGS ) settings : Settings | null ,
122
126
@Inject ( PLATFORM_ID ) platformId : Object ,
123
127
zone : NgZone ,
124
- @Optional ( ) @Inject ( PersistenceSettingsToken ) persistenceSettings : PersistenceSettings | null ,
128
+ @Optional ( ) @Inject ( PERSISTENCE_SETTINGS ) persistenceSettings : PersistenceSettings | null ,
125
129
) {
126
130
this . scheduler = new FirebaseZoneScheduler ( zone , platformId ) ;
127
131
this . firestore = zone . runOutsideAngular ( ( ) => {
0 commit comments