Skip to content

Commit 5c18afe

Browse files
rhodgkinsjoehanlaurenzlong
authored
Modify return type of DataSnapshot.forEach to boolean | void (#666)
This is to match the Admin SDK: https://github.com/firebase/firebase-js-sdk/blob/37b98e9271c494a0fb58ca1960f8fcfaec49ade9/packages/database/src/api/DataSnapshot.ts#L137 Co-authored-by: joehan <joehanley@google.com> Co-authored-by: Lauren Long <laurenzlong@users.noreply.github.com>
1 parent df35c1b commit 5c18afe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/database.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ export class DataSnapshot {
476476
* @return `true` if enumeration was canceled due to your callback
477477
* returning `true`.
478478
*/
479-
forEach(action: (a: DataSnapshot) => boolean): boolean {
479+
forEach(action: (a: DataSnapshot) => boolean | void): boolean {
480480
const val = this.val();
481481
if (_.isPlainObject(val)) {
482482
return _.some(

0 commit comments

Comments
 (0)