prescottprue / react-redux-firebase

Redux bindings for Firebase. Includes React Hooks and Higher Order Components.
https://react-redux-firebase.com
MIT License
2.55k stars 559 forks source link

No type definition for `profileFactory` #917

Closed SpaghettiC0des closed 4 years ago

SpaghettiC0des commented 4 years ago

Do you want to request a feature or report a bug?

Bug report

What is the current behavior? Type error on an RN TS project.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via codesandbox or similar.

  1. Create RN TS project
  2. Create a .ts file (e.g. index.ts)
  3. Paste the following code
    
    import {ReactReduxFirebaseConfig} from 'react-redux-firebase';

const rrfConfig: Partial = { enableRedirectHandling: false, useFirestoreForProfile: true, userProfile: 'users', profileFactory: (userData, profileData, firebase) => { const { user } = userData return { email: user.email } } };

4. Linter gets mad because it does not exist on `ReactReduxFirebaseConfig`

**What is the expected behavior?**
It should have no lint/ts errors

**Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?**

"react-redux-firebase": "^3.3.0",



<!-- Love react-redux-firebase? Please consider supporting our collective:
👉  https://opencollective.com/react-redux-firebase/donate -->
prescottprue commented 4 years ago

Released in v3.3.1