From c9728f065242985039c86097677100a61357e1d2 Mon Sep 17 00:00:00 2001 From: Darren Ackers Date: Fri, 4 Sep 2020 16:13:55 +0100 Subject: [PATCH] fix(database, types): updated .once type defs (#3842) * chore(database) Updated .once typ defs * Updated detox timeouts * Merged latest * Updated param description for failureCallbackContext --- packages/database/lib/index.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/database/lib/index.d.ts b/packages/database/lib/index.d.ts index 8c338dbb14..dcb2894823 100644 --- a/packages/database/lib/index.d.ts +++ b/packages/database/lib/index.d.ts @@ -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; + + once( + eventType: EventType, + successCallback?: (a: DataSnapshot, b?: string | null) => any, + failureCallbackContext?: ((a: Error) => void) | Record | null, + ): Promise; /** * Generates a new `Query` object ordered by the specified child key.