-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(database): Type definitions #8373
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
*/ | ||
export function serverTimestamp() { | ||
return firebase.database.ServerValue.TIMESTAMP; | ||
export function getServerTime(db) { |
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.
why two functions instead of having the first one check if db === undefined, followed by each branch doing the right thing? That idiom is already in a lot of the code, for what it's worth
@@ -220,5 +220,13 @@ export function getServerTime(db: Database): Promise<number>; | |||
*/ | |||
export function increment(delta: number): object; | |||
|
|||
/** | |||
* Logs debugging information to the console. |
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 it is not implemented, there should be some indication of why in the docs, also, perhaps not implemented native but is there any reason not to plumb it through for web?
@@ -239,6 +239,10 @@ export function get(query) { | |||
return query.once('value'); | |||
} | |||
|
|||
export function off(query, eventType, callback) { | |||
throw new Error("off() is not implemented"); |
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.
similar to enableLogging - if it is not implemented it seems that should be noted in the docs for the method in query.d.ts? And also same as enableLogging, any reason not to plumb it through on web/other implementation (if it is not already)
Description
Related issues
Release Summary
Checklist
Android
iOS
Other
(macOS, web)e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter