-
Notifications
You must be signed in to change notification settings - Fork 371
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
Update Database types #830
Conversation
This syncs the types with https://github.com/firebase/firebase-js-sdk/blob/master/packages/database-types/index.d.ts Fixes #805
@@ -1272,7 +1272,6 @@ export namespace admin.database { | |||
* ``` | |||
*/ | |||
root: admin.database.Reference; | |||
path: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we should make this change, but this doesn't exist in the Web types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Reference.path
is truly undefined let's remove it. Otherwise, let's call it deprecated for now and remove from a future major version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can make it deprecated. We removed in a major release on Web as well. FWIW, it is not actually a string but a util.Path object whose API is internal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It makes no sense to remove this. Why require developers to individually create helper functions to fetch the string path from every reference instead of keeping this useful variable?
Every time I deploy my functions I'm greeted by a wall of "path is depreciated" messages... Why should I need to make a function called getPath(reference) that is prone to errors and needed to be referenced throughout my entire codebase when this does exactly what it needs to do?
Consider continuing support for this since the justification to depreciate it is so flimsy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a suggestion 👍
@@ -1272,7 +1272,6 @@ export namespace admin.database { | |||
* ``` | |||
*/ | |||
root: admin.database.Reference; | |||
path: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If Reference.path
is truly undefined let's remove it. Otherwise, let's call it deprecated for now and remove from a future major version.
Not sure where else to post this, so putting it here: please indicate how devs are supposed to get the path without this property. See https://stackoverflow.com/q/63425252 |
This syncs the types with https://github.com/firebase/firebase-js-sdk/blob/master/packages/database-types/index.d.ts
Fixes #805