@@ -36,23 +36,23 @@ export class DocumentReader<T> {
36
36
/** An optional transaction ID to use for this read. */
37
37
transactionId ?: Uint8Array ;
38
38
39
- private remainingDocuments = new Set < string > ( ) ;
39
+ private outstandingDocuments = new Set < string > ( ) ;
40
40
private retrievedDocuments = new Map < string , DocumentSnapshot > ( ) ;
41
41
42
42
/**
43
43
* Internal method to retrieve multiple documents from Firestore, optionally
44
44
* as part of a transaction.
45
45
*
46
46
* @param firestore The Firestore instance to use.
47
- * @param allDocuments The documents to receive .
47
+ * @param allDocuments The documents to get .
48
48
* @returns A Promise that contains an array with the resulting documents.
49
49
*/
50
50
constructor (
51
51
private firestore : Firestore ,
52
52
private allDocuments : Array < DocumentReference < T > >
53
53
) {
54
54
for ( const docRef of this . allDocuments ) {
55
- this . remainingDocuments . add ( docRef . formattedName ) ;
55
+ this . outstandingDocuments . add ( docRef . formattedName ) ;
56
56
}
57
57
}
58
58
@@ -90,14 +90,14 @@ export class DocumentReader<T> {
90
90
}
91
91
92
92
private async fetchDocuments ( requestTag : string ) : Promise < void > {
93
- if ( ! this . remainingDocuments . size ) {
93
+ if ( ! this . outstandingDocuments . size ) {
94
94
return ;
95
95
}
96
96
97
97
const request : api . IBatchGetDocumentsRequest = {
98
98
database : this . firestore . formattedName ,
99
99
transaction : this . transactionId ,
100
- documents : Array . from ( this . remainingDocuments ) ,
100
+ documents : Array . from ( this . outstandingDocuments ) ,
101
101
} ;
102
102
103
103
if ( this . fieldMask ) {
@@ -145,7 +145,7 @@ export class DocumentReader<T> {
145
145
}
146
146
147
147
const path = snapshot . ref . formattedName ;
148
- this . remainingDocuments . delete ( path ) ;
148
+ this . outstandingDocuments . delete ( path ) ;
149
149
this . retrievedDocuments . set ( path , snapshot ) ;
150
150
++ resultCount ;
151
151
}
0 commit comments