Skip to content

Commit c17ed30

Browse files
committed
Updated comments
1 parent b132ae5 commit c17ed30

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

packages/database-compat/src/api/Reference.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,11 @@ export class DataSnapshot implements Compat<ModularDataSnapshot> {
208208
}
209209
}
210210

211+
/**
212+
* Represents a child snapshot of a `Reference` that is being iterated over. The key will never be undefined.
213+
*/
211214
export interface IteratedDataSnapshot extends DataSnapshot {
212-
key: string;
215+
key: string; // key of the location of this snapshot.
213216
}
214217

215218
export interface SnapshotCallback {

packages/database-types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ import { FirebaseApp } from '@firebase/app-types';
1919
import { EmulatorMockTokenOptions } from '@firebase/util';
2020

2121
/**
22-
* Represents a child snapshot of an iterated `Reference`. The key will never be undefined.
22+
* Represents a child snapshot of a `Reference` that is being iterated over. The key will never be undefined.
2323
*/
2424
export interface IteratedDataSnapshot extends DataSnapshot {
25-
key: string;
25+
key: string; // key of the location of this snapshot.
2626
}
2727

2828
export interface DataSnapshot {

packages/database/src/api/Reference_impl.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ export class DataSnapshot {
376376
}
377377

378378
/**
379-
* Enumerates the top-level children in the `IteratorDataSnapshot`.
379+
* Enumerates the top-level children in the `IteratedDataSnapshot`.
380380
*
381381
* Because of the way JavaScript objects work, the ordering of data in the
382382
* JavaScript object returned by `val()` is not guaranteed to match the
@@ -464,10 +464,10 @@ export class DataSnapshot {
464464
}
465465

466466
/**
467-
* Represents a child snapshot of an iterated `Reference`. The key will never be undefined.
467+
* Represents a child snapshot of a `Reference` that is being iterated over. The key will never be undefined.
468468
*/
469469
export interface IteratedDataSnapshot extends DataSnapshot {
470-
key: string;
470+
key: string; // key of the location of this snapshot.
471471
}
472472

473473
/**

0 commit comments

Comments
 (0)