Skip to content

Inconsistent typings across @firebase/database and @firebase/database-types #3476

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

Closed
MathBunny opened this issue Jul 24, 2020 · 2 comments
Closed

Comments

@MathBunny
Copy link

While working on this PR I came across several inconsistencies with the typings across @firebase/database and @firebase/database-typing. For example, there are multiple cases where unknown is used in-place of any.

In an ideal world, there is Database from @firebase/database implementing FirebaseDatabase from @firebase/database-types, this would ensure that the two are compatible with one another.

I intend to use the type FirebaseDatabase as an interface for Database instances but it isn't possible in TS right now. I attempted the change myself but it got involved after a point because differences span a bit more than just replacing unknown to any once the Query class gets involved.

Thanks!

@google-oss-bot
Copy link
Contributor

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@MathBunny
Copy link
Author

Looks like this won't be a simple fix, and was likely intentional. Closing this for now.

@firebase firebase locked and limited conversation to collaborators Aug 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants