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

bug(types): return type for firebase.updateProfile is not a promise #975

Closed zachary-young closed 3 years ago

zachary-young commented 4 years ago

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

bug

What is the current behavior?

Typescript shows an error when appending .then() to firebase.updateProfile()

Property 'then' does not exist on type 'void'

What is the expected behavior?

Typescript recognizes updateProfile() as promise in index.d.ts

updateProfile: (profile: Partial<ProfileType>, options?: Object) => void

should be updateProfile: (profile: Partial<ProfileType>, options?: Object) => Promise<void>

prescottprue commented 4 years ago

Thanks for reporting, looks like you are right. Open to a PR if you get a chance, otherwise I will get to it when I can