@firebase/database 0.13.3-canary.f36d627af → 0.13.3-canary.f5426a512

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -156,7 +156,9 @@ export declare class DataSnapshot {
156
156
  * @returns true if enumeration was canceled due to your callback returning
157
157
  * true.
158
158
  */
159
- forEach(action: (child: DataSnapshot) => boolean | void): boolean;
159
+ forEach(action: (child: DataSnapshot & {
160
+ key: string;
161
+ }) => boolean | void): boolean;
160
162
  /**
161
163
  * Returns true if the specified child path has (non-null) data.
162
164
  *
@@ -842,12 +844,11 @@ export declare function onChildRemoved(query: Query, callback: (snapshot: DataSn
842
844
  export declare function onChildRemoved(query: Query, callback: (snapshot: DataSnapshot) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe;
843
845
  export { EventType };
844
846
  /**
845
- * Detaches a callback previously attached with `on()`.
847
+ * Detaches a callback previously attached with the corresponding `on*()` (`onValue`, `onChildAdded`) listener.
848
+ * Note: This is not the recommended way to remove a listener. Instead, please use the returned callback function from
849
+ * the respective `on*` callbacks.
846
850
  *
847
- * Detach a callback previously attached with `on()`. Note that if `on()` was
848
- * called multiple times with the same eventType and callback, the callback
849
- * will be called multiple times for each event, and `off()` must be called
850
- * multiple times to remove the callback. Calling `off()` on a parent listener
851
+ * Detach a callback previously attached with `on*()`. Calling `off()` on a parent listener
851
852
  * will not automatically remove listeners registered on child nodes, `off()`
852
853
  * must also be called on any child listeners to remove the callback.
853
854
  *
package/dist/private.d.ts CHANGED
@@ -337,7 +337,9 @@ export declare class DataSnapshot {
337
337
  * @returns true if enumeration was canceled due to your callback returning
338
338
  * true.
339
339
  */
340
- forEach(action: (child: DataSnapshot) => boolean | void): boolean;
340
+ forEach(action: (child: DataSnapshot & {
341
+ key: string;
342
+ }) => boolean | void): boolean;
341
343
  /**
342
344
  * Returns true if the specified child path has (non-null) data.
343
345
  *
@@ -1151,12 +1153,11 @@ declare interface NodeFilter_2 {
1151
1153
  }
1152
1154
 
1153
1155
  /**
1154
- * Detaches a callback previously attached with `on()`.
1156
+ * Detaches a callback previously attached with the corresponding `on*()` (`onValue`, `onChildAdded`) listener.
1157
+ * Note: This is not the recommended way to remove a listener. Instead, please use the returned callback function from
1158
+ * the respective `on*` callbacks.
1155
1159
  *
1156
- * Detach a callback previously attached with `on()`. Note that if `on()` was
1157
- * called multiple times with the same eventType and callback, the callback
1158
- * will be called multiple times for each event, and `off()` must be called
1159
- * multiple times to remove the callback. Calling `off()` on a parent listener
1160
+ * Detach a callback previously attached with `on*()`. Calling `off()` on a parent listener
1160
1161
  * will not automatically remove listeners registered on child nodes, `off()`
1161
1162
  * must also be called on any child listeners to remove the callback.
1162
1163
  *
package/dist/public.d.ts CHANGED
@@ -159,7 +159,9 @@ export declare class DataSnapshot {
159
159
  * @returns true if enumeration was canceled due to your callback returning
160
160
  * true.
161
161
  */
162
- forEach(action: (child: DataSnapshot) => boolean | void): boolean;
162
+ forEach(action: (child: DataSnapshot & {
163
+ key: string;
164
+ }) => boolean | void): boolean;
163
165
  /**
164
166
  * Returns true if the specified child path has (non-null) data.
165
167
  *
@@ -403,12 +405,11 @@ export declare interface ListenOptions {
403
405
  readonly onlyOnce?: boolean;
404
406
  }
405
407
  /**
406
- * Detaches a callback previously attached with `on()`.
408
+ * Detaches a callback previously attached with the corresponding `on*()` (`onValue`, `onChildAdded`) listener.
409
+ * Note: This is not the recommended way to remove a listener. Instead, please use the returned callback function from
410
+ * the respective `on*` callbacks.
407
411
  *
408
- * Detach a callback previously attached with `on()`. Note that if `on()` was
409
- * called multiple times with the same eventType and callback, the callback
410
- * will be called multiple times for each event, and `off()` must be called
411
- * multiple times to remove the callback. Calling `off()` on a parent listener
412
+ * Detach a callback previously attached with `on*()`. Calling `off()` on a parent listener
412
413
  * will not automatically remove listeners registered on child nodes, `off()`
413
414
  * must also be called on any child listeners to remove the callback.
414
415
  *
@@ -156,7 +156,9 @@ export declare class DataSnapshot {
156
156
  * @returns true if enumeration was canceled due to your callback returning
157
157
  * true.
158
158
  */
159
- forEach(action: (child: DataSnapshot) => boolean | void): boolean;
159
+ forEach(action: (child: DataSnapshot & {
160
+ key: string;
161
+ }) => boolean | void): boolean;
160
162
  /**
161
163
  * Returns true if the specified child path has (non-null) data.
162
164
  *
@@ -842,12 +844,11 @@ export declare function onChildRemoved(query: Query, callback: (snapshot: DataSn
842
844
  export declare function onChildRemoved(query: Query, callback: (snapshot: DataSnapshot) => unknown, cancelCallback: (error: Error) => unknown, options: ListenOptions): Unsubscribe;
843
845
  export { EventType };
844
846
  /**
845
- * Detaches a callback previously attached with `on()`.
847
+ * Detaches a callback previously attached with the corresponding `on*()` (`onValue`, `onChildAdded`) listener.
848
+ * Note: This is not the recommended way to remove a listener. Instead, please use the returned callback function from
849
+ * the respective `on*` callbacks.
846
850
  *
847
- * Detach a callback previously attached with `on()`. Note that if `on()` was
848
- * called multiple times with the same eventType and callback, the callback
849
- * will be called multiple times for each event, and `off()` must be called
850
- * multiple times to remove the callback. Calling `off()` on a parent listener
851
+ * Detach a callback previously attached with `on*()`. Calling `off()` on a parent listener
851
852
  * will not automatically remove listeners registered on child nodes, `off()`
852
853
  * must also be called on any child listeners to remove the callback.
853
854
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firebase/database",
3
- "version": "0.13.3-canary.f36d627af",
3
+ "version": "0.13.3-canary.f5426a512",
4
4
  "description": "",
5
5
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
6
  "main": "dist/index.node.cjs.js",
@@ -45,15 +45,15 @@
45
45
  "license": "Apache-2.0",
46
46
  "peerDependencies": {},
47
47
  "dependencies": {
48
- "@firebase/logger": "0.3.3-canary.f36d627af",
49
- "@firebase/util": "1.6.3-canary.f36d627af",
50
- "@firebase/component": "0.5.17-canary.f36d627af",
51
- "@firebase/auth-interop-types": "0.1.6-canary.f36d627af",
48
+ "@firebase/logger": "0.3.3-canary.f5426a512",
49
+ "@firebase/util": "1.6.3-canary.f5426a512",
50
+ "@firebase/component": "0.5.17-canary.f5426a512",
51
+ "@firebase/auth-interop-types": "0.1.6-canary.f5426a512",
52
52
  "faye-websocket": "0.11.4",
53
53
  "tslib": "^2.1.0"
54
54
  },
55
55
  "devDependencies": {
56
- "@firebase/app": "0.7.28-canary.f36d627af",
56
+ "@firebase/app": "0.7.29-canary.f5426a512",
57
57
  "rollup": "2.72.1",
58
58
  "rollup-plugin-typescript2": "0.31.2",
59
59
  "typescript": "4.2.2"