Skip to content

Commit f8229c6

Browse files
Update Database types (#830)
1 parent e1680fc commit f8229c6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/database.d.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -986,8 +986,8 @@ export namespace admin.database {
986986
*/
987987
on(
988988
eventType: admin.database.EventType,
989-
callback: (a: admin.database.DataSnapshot | null, b?: string) => any,
990-
cancelCallbackOrContext?: Object | null,
989+
callback: (a: admin.database.DataSnapshot, b?: string | null) => any,
990+
cancelCallbackOrContext?: ((a: Error) => any) | Object | null,
991991
context?: Object | null
992992
): (a: admin.database.DataSnapshot | null, b?: string) => any;
993993

@@ -1024,8 +1024,8 @@ export namespace admin.database {
10241024
*/
10251025
once(
10261026
eventType: admin.database.EventType,
1027-
successCallback?: (a: admin.database.DataSnapshot, b?: string) => any,
1028-
failureCallbackOrContext?: Object | null,
1027+
successCallback?: (a: admin.database.DataSnapshot, b?: string | null ) => any,
1028+
failureCallbackOrContext?: ((a: Error) => void) | Object | null,
10291029
context?: Object | null
10301030
): Promise<admin.database.DataSnapshot>;
10311031

@@ -1272,6 +1272,7 @@ export namespace admin.database {
12721272
* ```
12731273
*/
12741274
root: admin.database.Reference;
1275+
/** @deprecated Removed in next major release to match Web SDK typings. */
12751276
path: string;
12761277

12771278
/**

0 commit comments

Comments
 (0)