Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -809,12 +809,12 @@ export function firebaseConnect<ProfileType, TInner = {}>(
export function firebaseReducer<
UserType,
Schema extends Record<string, Record<string | number, string | number>>
>(state: any, action: any): FirebaseReducer.Reducer<Schema, UserType>
>(state: any, action: any): FirebaseReducer.Reducer<UserType, Schema>

export function makeFirebaseReducer<
Schema extends Record<string, Record<string | number, string | number>>,
UserType = {}
>(): (state: any, action: any) => FirebaseReducer.Reducer<Schema, UserType>
UserType = {},
Schema extends Record<string, Record<string | number, string | number>> = {}
>(): (state: any, action: any) => FirebaseReducer.Reducer<UserType, Schema>

/**
* React HOC that attaches/detaches Cloud Firestore listeners on mount/unmount
Expand Down Expand Up @@ -1037,7 +1037,9 @@ export interface ReduxFirestoreConfig {
preserveOnListenerError: null | object

// https://github.com/prescottprue/redux-firestore#onattemptcollectiondelete
onAttemptCollectionDelete: null | ((queryOption: any, dispatch: any, firebase: any) => void)
onAttemptCollectionDelete:
| null
| ((queryOption: any, dispatch: any, firebase: any) => void)

// https://github.com/prescottprue/redux-firestore#mergeordered
mergeOrdered: boolean
Expand Down Expand Up @@ -1128,8 +1130,8 @@ export interface Data<T extends FirestoreTypes.DocumentData> {

export namespace FirebaseReducer {
export interface Reducer<
Schema extends Record<string, Record<string | number, string | number>>,
ProfileType = {}
ProfileType = {},
Schema extends Record<string, Record<string | number, string | number>> = {}
> {
auth: AuthState
profile: Profile<ProfileType>
Expand Down