@@ -462,12 +462,12 @@ export function firebaseConnect<ProfileType, TInner = {}>(
462
462
*/
463
463
export function firebaseReducer < UserType > (
464
464
...args : any [ ]
465
- ) : firebaseReducer . Reducer < UserType >
465
+ ) : FirebaseReducer . Reducer < UserType >
466
466
467
467
/**
468
468
* Reducer for Firebase state
469
469
*/
470
- export function firebaseStateReducer ( ...args : any [ ] ) : firestoreReducer . Reducer
470
+ export function firebaseStateReducer ( ...args : any [ ] ) : FirestoreReducer . Reducer
471
471
472
472
/**
473
473
* React HOC that attaches/detaches Cloud Firestore listeners on mount/unmount
@@ -485,7 +485,7 @@ export function firestoreConnect<TInner = {}>(
485
485
/**
486
486
* Reducer for Firestore state
487
487
*/
488
- export function firestoreReducer ( ...args : any [ ] ) : any
488
+ export function firestoreReducer ( ...args : any [ ] ) : FirestoreReducer . Reducer
489
489
490
490
export function fixPath ( path : string ) : string
491
491
@@ -605,7 +605,7 @@ export namespace createWithFirestore {
605
605
606
606
// Your Firebase/Firestore user profile object type
607
607
// http://docs.react-redux-firebase.com/history/v3.0.0/docs/recipes/profile.html
608
- export type ProfileType = object
608
+ export type ProfileType = { }
609
609
610
610
export interface Listeners {
611
611
allIds : string [ ]
@@ -626,11 +626,10 @@ export interface Data {
626
626
}
627
627
}
628
628
629
- export namespace firebaseReducer {
630
- export interface Reducer < ProfileType > {
629
+ export namespace FirebaseReducer {
630
+ export interface Reducer < ProfileType = { } > {
631
631
auth : Auth
632
- profile : ProfileType
633
- // profile: Profile
632
+ profile : Profile < ProfileType >
634
633
authError : any
635
634
data : Data
636
635
errors : any [ ]
@@ -663,19 +662,17 @@ export namespace firebaseReducer {
663
662
}
664
663
665
664
// can be extended for optional properties from your database
666
- export interface Profile {
665
+ export type Profile < ProfileType > = {
667
666
isLoaded : boolean
668
667
isEmpty : boolean
669
- }
670
-
671
- const prototype : { }
672
- }
668
+ } & ProfileType
673
669
674
- export namespace firebaseStateReducer {
675
- const prototype : { }
670
+ export namespace firebaseStateReducer {
671
+ const prototype : { }
672
+ }
676
673
}
677
674
678
- export namespace firestoreReducer {
675
+ export namespace FirestoreReducer {
679
676
export interface Reducer {
680
677
composite : any
681
678
data : { }
0 commit comments