Skip to content

Commit

Permalink
Updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
maneesht committed Aug 19, 2022
1 parent b132ae5 commit c17ed30
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion packages/database-compat/src/api/Reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,11 @@ export class DataSnapshot implements Compat<ModularDataSnapshot> {
}
}

/**
* Represents a child snapshot of a `Reference` that is being iterated over. The key will never be undefined.
*/
export interface IteratedDataSnapshot extends DataSnapshot {
key: string;
key: string; // key of the location of this snapshot.
}

export interface SnapshotCallback {
Expand Down
4 changes: 2 additions & 2 deletions packages/database-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import { FirebaseApp } from '@firebase/app-types';
import { EmulatorMockTokenOptions } from '@firebase/util';

/**
* Represents a child snapshot of an iterated `Reference`. The key will never be undefined.
* Represents a child snapshot of a `Reference` that is being iterated over. The key will never be undefined.
*/
export interface IteratedDataSnapshot extends DataSnapshot {
key: string;
key: string; // key of the location of this snapshot.
}

export interface DataSnapshot {
Expand Down
6 changes: 3 additions & 3 deletions packages/database/src/api/Reference_impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ export class DataSnapshot {
}

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

/**
* Represents a child snapshot of an iterated `Reference`. The key will never be undefined.
* Represents a child snapshot of a `Reference` that is being iterated over. The key will never be undefined.
*/
export interface IteratedDataSnapshot extends DataSnapshot {
key: string;
key: string; // key of the location of this snapshot.
}

/**
Expand Down

0 comments on commit c17ed30

Please sign in to comment.