Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[typings][Typescript] Fix TS definitions so modules can be accessed from the default export #788

Conversation

pheromonez
Copy link
Contributor

Fixes #774

Have kept this commit small and only touched the parts of the code that needed to change in order to resolve the linked issue. Can now access auth (and other modules) using this syntax:

import firebase from 'react-native-firebase';
firebase.auth().signInAnonymously().then(........);

The current method of access is still supported:

import firebase from 'react-native-firebase';
firebase.app().auth().signInAnonymously().then(........);

@chrisbianca
Copy link
Contributor

This looks great, thank you!

@Ehesp @Salakar if you're happy we can get this merged in.

@chrisbianca
Copy link
Contributor

@pheromonez I've merged #771 which has thrown up a merge conflict here. Are you able to resolve and then we can get this merged too? Thanks again!

@chrisbianca
Copy link
Contributor

@pheromonez Thanks for the tweaks. Has this resolved all of the compilation issues that were flagged by @danielw93 as part of #771? If so, we can get this merged...

@pheromonez
Copy link
Contributor Author

Just pushed another change, somehow two of the fixes that @danielw93 put through in #784 got reverted. I probably merged incorrectly. Anyhow, my local Typescript compiler isn't complaining about this file so I think it's good to go :)

@chrisbianca chrisbianca merged commit 66da0b9 into invertase:master Jan 30, 2018
@Ehesp
Copy link
Member

Ehesp commented Jan 30, 2018

Thanks again for this!

@pheromonez
Copy link
Contributor Author

@Ehesp Happy to help, thanks for the great library, it's saved us heaps on our current project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typescript not working on firebase. unless used as firebase.app().
3 participants