Skip to content

Commit 3634fd6

Browse files
Renames
1 parent 1e9080d commit 3634fd6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dev/src/document-reader.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,23 @@ export class DocumentReader<T> {
3636
/** An optional transaction ID to use for this read. */
3737
transactionId?: Uint8Array;
3838

39-
private remainingDocuments = new Set<string>();
39+
private outstandingDocuments = new Set<string>();
4040
private retrievedDocuments = new Map<string, DocumentSnapshot>();
4141

4242
/**
4343
* Internal method to retrieve multiple documents from Firestore, optionally
4444
* as part of a transaction.
4545
*
4646
* @param firestore The Firestore instance to use.
47-
* @param allDocuments The documents to receive.
47+
* @param allDocuments The documents to get.
4848
* @returns A Promise that contains an array with the resulting documents.
4949
*/
5050
constructor(
5151
private firestore: Firestore,
5252
private allDocuments: Array<DocumentReference<T>>
5353
) {
5454
for (const docRef of this.allDocuments) {
55-
this.remainingDocuments.add(docRef.formattedName);
55+
this.outstandingDocuments.add(docRef.formattedName);
5656
}
5757
}
5858

@@ -90,14 +90,14 @@ export class DocumentReader<T> {
9090
}
9191

9292
private async fetchDocuments(requestTag: string): Promise<void> {
93-
if (!this.remainingDocuments.size) {
93+
if (!this.outstandingDocuments.size) {
9494
return;
9595
}
9696

9797
const request: api.IBatchGetDocumentsRequest = {
9898
database: this.firestore.formattedName,
9999
transaction: this.transactionId,
100-
documents: Array.from(this.remainingDocuments),
100+
documents: Array.from(this.outstandingDocuments),
101101
};
102102

103103
if (this.fieldMask) {
@@ -145,7 +145,7 @@ export class DocumentReader<T> {
145145
}
146146

147147
const path = snapshot.ref.formattedName;
148-
this.remainingDocuments.delete(path);
148+
this.outstandingDocuments.delete(path);
149149
this.retrievedDocuments.set(path, snapshot);
150150
++resultCount;
151151
}

0 commit comments

Comments
 (0)