Skip to content

Commit

Permalink
Merge 63f96dc into a1e90ae
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuart Casarotto authored Nov 13, 2020
2 parents a1e90ae + 63f96dc commit fc80063
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/database/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -646,10 +646,10 @@ export namespace FirebaseDatabaseTypes {
*/
on(
eventType?: EventType,
callback?: Function,
cancelCallbackOrContext?: Record<string, any>,
callback?: (a: DataSnapshot, b?: string | null) => any,
cancelCallbackOrContext?: ((a: Error) => any) | Object | null,
context?: Record<string, any> | null,
): Function;
): (a: DataSnapshot, b?: string | null) => any;

/**
* Listens for exactly one event of the specified event type, and then stops listening.
Expand All @@ -670,12 +670,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.
@param context If provided, this object will be used as this when calling your callback(s).
*/

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

/**
Expand Down

0 comments on commit fc80063

Please sign in to comment.