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.