firebase / firebase-functions

Firebase SDK for Cloud Functions
https://firebase.google.com/docs/functions/
MIT License
1.01k stars 201 forks source link

Bug in database.d.ts #1516

Closed sebastianrueckerai closed 4 months ago

sebastianrueckerai commented 5 months ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch firebase-functions@4.6.0 for the project I'm working on.

You can find details about the issue here https://github.com/firebase/firebase-functions/issues/1496

Here is the diff that solved my problem:

diff --git a/node_modules/firebase-functions/lib/common/providers/database.d.ts b/node_modules/firebase-functions/lib/common/providers/database.d.ts
index fe660d1..1d40471 100644
--- a/node_modules/firebase-functions/lib/common/providers/database.d.ts
+++ b/node_modules/firebase-functions/lib/common/providers/database.d.ts
@@ -97,7 +97,7 @@ export declare class DataSnapshot implements database.DataSnapshot {
      * @return `true` if enumeration was canceled due to your callback
      *   returning `true`.
      */
-    forEach(action: (a: DataSnapshot) => boolean | void): boolean;
+    forEach(action: (a: any) => boolean | void): boolean;
     /**
      * Returns `true` if the specified child path has (non-`null`) data.
      *

This issue body was partially generated by patch-package.

google-oss-bot commented 5 months ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

sceee commented 5 months ago

Duplicates #1513

exaby73 commented 4 months ago

Fixed by https://github.com/firebase/firebase-functions/pull/1517. I will close this issue for that reason