Skip to content

Commit

Permalink
Update typings of ReactReduxFirebaseProvider and ReduxFirestoreProvid…
Browse files Browse the repository at this point in the history
…er - #564
  • Loading branch information
Scott Prue committed Jan 1, 2019
1 parent a424cbe commit 8e8f58b
Showing 1 changed file with 21 additions and 25 deletions.
46 changes: 21 additions & 25 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,47 +180,47 @@ export function populate(
notSetValue?: any
): any

export function reactReduxFirebase(instance: object, otherConfig: any): any

/**
* Props passed to ReactReduFirebaseContext component
* React Context provider for Firebase instance (with methods wrapped in dispatch). Needed to use HOCs
* like firebaseConnect and withFirebase.
*/
export interface ReactReduxFirebaseContextProps {
firebase: object,
config: object,
dispatch: (action) => void
createFirestoreInstance?: (firebase: object, config: object, dispatch: (action) => void) => object
}
export function ReactReduxFirebaseProvider(props: ReactReduxFirebaseProviderProps): any;

/**
* React Context for Firebase instance.
* Props passed to ReactReduFirebaseContext component
*/
export namespace ReactReduxFirebaseContext {
const prototype: {}
export interface ReactReduxFirebaseProviderProps<T> {
value: T;
firebase: object;
config: object;
children?: React.ReactNode;
dispatch: (action: object) => void;
createFirestoreInstance?: (firebase: object, config: object, dispatch: (action: object) => void) => object
}

/**
* React Context provider for Firebase instance (with methods wrapped in dispatch). Needed to use HOCs
* like firebaseConnect and withFirebase.
* React Context for Firebase instance.
*/
export namespace ReactReduxFirebaseProvider {
export namespace ReduxFirestoreContext {
const prototype: {}
}

/**
* React Context for Firebase instance.
* Props passed to ReactReduFirebaseContext component
*/
export namespace ReduxFirestoreContext {
const prototype: {}
export interface ReduxFirestoreProviderProps {
firebase: object;
config: object;
dispatch: (action: object) => void;
createFirestoreInstance: (firebase: object, config: object, dispatch: (action: object) => void) => object;
children: React.ReactNode;
}

/**
* React Context provider for Firestore instance (with methods wrapped in dispatch). Needed to use HOCs
* like firestoreConnect and withFirestore.
*/
export namespace ReduxFirestoreProvider {
const prototype: {}
}
export function ReduxFirestoreProvider(props: ReduxFirestoreProviderProps): any;

/**
* React Higher Order Component that passes firebase as a prop (comes from context.store.firebase)
Expand Down Expand Up @@ -283,10 +283,6 @@ export namespace fixPath {
const prototype: {}
}

export namespace getFirebase {
const prototype: {}
}

export namespace getVal {
const prototype: {}
}
Expand Down

0 comments on commit 8e8f58b

Please sign in to comment.