@@ -617,31 +617,33 @@ export interface Listeners {
617617 }
618618}
619619
620+ export type TypeWithId < T > = T & { id : string }
621+
620622export interface Ordered < T extends FirestoreTypes . DocumentData > {
621- [ collection : string ] : ( T & { id : string } ) [ ]
623+ [ collection : string ] : TypeWithId < T > [ ]
622624}
623625
624626export interface Dictionary < T > {
625627 [ documentId : string ] : T
626628}
627629
628630export interface Data < T extends FirestoreTypes . DocumentData > {
629- [ collection : string ] : Dictionary < T >
631+ [ collection : string ] : T
630632}
631633
632634export namespace FirebaseReducer {
633635 export interface Reducer < ProfileType = { } > {
634636 auth : Auth
635637 profile : Profile < ProfileType >
636638 authError : any
637- data : Data < any >
639+ data : Data < any | Dictionary < any > >
638640 ordered : Ordered < any >
639641 errors : any [ ]
640642 isInitializing : boolean
641643 listeners : Listeners
642- requested : { }
643- requesting : { }
644- timestamps : { }
644+ requested : Dictionary < boolean >
645+ requesting : Dictionary < boolean >
646+ timestamps : Dictionary < number >
645647 }
646648
647649 export interface Auth extends AuthTypes . UserInfo {
@@ -677,21 +679,19 @@ export namespace FirebaseReducer {
677679
678680export namespace FirestoreReducer {
679681 export interface Reducer {
680- composite ?: Data < any >
681- data : {
682- [ collection : string ] : any | Dictionary < any >
683- }
682+ composite ?: Data < any | Dictionary < any > >
683+ data : Data < any | Dictionary < any > >
684684 errors : {
685685 allIds : string [ ]
686686 byQuery : any [ ]
687687 }
688688 listeners : Listeners
689689 ordered : Ordered < any >
690- queries : any
690+ queries : Data < FirestoreQueryOptions & ( Dictionary < any > | any ) >
691691 status : {
692- requested : { }
693- requesting : { }
694- timestamps : { }
692+ requested : Dictionary < boolean >
693+ requesting : Dictionary < boolean >
694+ timestamps : Dictionary < number >
695695 }
696696 }
697697
0 commit comments