From f3067f72d37eb838554be5a3a14d10a019631e6f Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Thu, 6 Jul 2023 14:17:56 -0700 Subject: [PATCH] Fix RTDB typings used by compat (#7422) --- .changeset/soft-grapes-occur.md | 5 +++++ packages/firebase/compat/index.d.ts | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .changeset/soft-grapes-occur.md diff --git a/.changeset/soft-grapes-occur.md b/.changeset/soft-grapes-occur.md new file mode 100644 index 00000000000..92d50de1b1f --- /dev/null +++ b/.changeset/soft-grapes-occur.md @@ -0,0 +1,5 @@ +--- +'firebase': patch +--- + +Fix typings for v10 diff --git a/packages/firebase/compat/index.d.ts b/packages/firebase/compat/index.d.ts index e4f62138d13..671ae3a3412 100644 --- a/packages/firebase/compat/index.d.ts +++ b/packages/firebase/compat/index.d.ts @@ -5819,7 +5819,7 @@ declare namespace firebase.database { * returning true. */ forEach( - action: (a: firebase.database.IteratorDataSnapshot) => boolean | void + action: (a: firebase.database.IteratedDataSnapshot) => boolean | void ): boolean; /** * Gets the priority value of the data in this `DataSnapshot`. @@ -5998,6 +5998,10 @@ declare namespace firebase.database { toJSON(): Object | null; } + interface IteratedDataSnapshot extends DataSnapshot { + key: string; // key of the location of this snapshot. + } + /** * The Firebase Database service interface. *