Skip to content

Commit

Permalink
fix(database, types): updated .once type defs (#3842)
Browse files Browse the repository at this point in the history
* chore(database) Updated .once typ defs

* Updated detox timeouts

* Merged latest

* Updated param description for failureCallbackContext
  • Loading branch information
dackers86 authored Sep 4, 2020
1 parent b4436ea commit c9728f0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/database/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -669,8 +669,14 @@ export namespace FirebaseDatabaseTypes {
*
* @param eventType One of the following strings: "value", "child_added", "child_changed", "child_removed", or "child_moved."
* @param successCallback A callback that fires when the specified event occurs. The callback will be passed a DataSnapshot. For ordering purposes, "child_added", "child_changed", and "child_moved" will also be passed a string containing the key of the previous child by sort order, or `null` if it is the first child.
@param failureCallbackContext An optional callback that will be notified if your client does not have permission to read the data. This callback will be passed an Error object indicating why the failure occurred.
*/
once(eventType: EventType, successCallback?: Function): Promise<DataSnapshot>;

once(
eventType: EventType,
successCallback?: (a: DataSnapshot, b?: string | null) => any,
failureCallbackContext?: ((a: Error) => void) | Record<string, any> | null,
): Promise<DataSnapshot>;

/**
* Generates a new `Query` object ordered by the specified child key.
Expand Down

1 comment on commit c9728f0

@vercel
Copy link

@vercel vercel bot commented on c9728f0 Sep 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.