@@ -48,7 +48,7 @@ export interface Stage extends ProtoSerializable<ProtoStage> {
4848export class AddFields implements Stage {
4949 name = 'add_fields' ;
5050
51- constructor ( private fields : Map < string , Expr > ) { }
51+ constructor ( readonly fields : Map < string , Expr > ) { }
5252
5353 /**
5454 * @internal
@@ -69,8 +69,8 @@ export class Aggregate implements Stage {
6969 name = 'aggregate' ;
7070
7171 constructor (
72- private accumulators : Map < string , Accumulator > ,
73- private groups : Map < string , Expr >
72+ readonly accumulators : Map < string , Accumulator > ,
73+ readonly groups : Map < string , Expr >
7474 ) { }
7575
7676 /**
@@ -94,7 +94,7 @@ export class Aggregate implements Stage {
9494export class Distinct implements Stage {
9595 name = 'distinct' ;
9696
97- constructor ( private groups : Map < string , Expr > ) { }
97+ constructor ( readonly groups : Map < string , Expr > ) { }
9898
9999 /**
100100 * @internal
@@ -114,7 +114,7 @@ export class Distinct implements Stage {
114114export class CollectionSource implements Stage {
115115 name = 'collection' ;
116116
117- constructor ( private collectionPath : string ) {
117+ constructor ( readonly collectionPath : string ) {
118118 if ( ! this . collectionPath . startsWith ( '/' ) ) {
119119 this . collectionPath = '/' + this . collectionPath ;
120120 }
@@ -138,7 +138,7 @@ export class CollectionSource implements Stage {
138138export class CollectionGroupSource implements Stage {
139139 name = 'collection_group' ;
140140
141- constructor ( private collectionId : string ) { }
141+ constructor ( readonly collectionId : string ) { }
142142
143143 /**
144144 * @internal
@@ -175,7 +175,7 @@ export class DatabaseSource implements Stage {
175175export class DocumentsSource implements Stage {
176176 name = 'documents' ;
177177
178- constructor ( private docPaths : string [ ] ) { }
178+ constructor ( readonly docPaths : string [ ] ) { }
179179
180180 static of ( refs : DocumentReference [ ] ) : DocumentsSource {
181181 return new DocumentsSource ( refs . map ( ref => '/' + ref . path ) ) ;
@@ -201,7 +201,7 @@ export class DocumentsSource implements Stage {
201201export class Where implements Stage {
202202 name = 'where' ;
203203
204- constructor ( private condition : FilterCondition & Expr ) { }
204+ constructor ( readonly condition : FilterCondition & Expr ) { }
205205
206206 /**
207207 * @internal
@@ -243,11 +243,11 @@ export class FindNearest implements Stage {
243243 * @param _distanceField
244244 */
245245 constructor (
246- private _field : Field ,
247- private _vectorValue : ObjectValue ,
248- private _distanceMeasure : 'euclidean' | 'cosine' | 'dot_product' ,
249- private _limit ?: number ,
250- private _distanceField ?: string
246+ readonly _field : Field ,
247+ readonly _vectorValue : ObjectValue ,
248+ readonly _distanceMeasure : 'euclidean' | 'cosine' | 'dot_product' ,
249+ readonly _limit ?: number ,
250+ readonly _distanceField ?: string
251251 ) { }
252252
253253 /**
@@ -286,7 +286,7 @@ export class FindNearest implements Stage {
286286export class Limit implements Stage {
287287 name = 'limit' ;
288288
289- constructor ( private limit : number ) { }
289+ constructor ( readonly limit : number ) { }
290290
291291 /**
292292 * @internal
@@ -306,7 +306,7 @@ export class Limit implements Stage {
306306export class Offset implements Stage {
307307 name = 'offset' ;
308308
309- constructor ( private offset : number ) { }
309+ constructor ( readonly offset : number ) { }
310310
311311 /**
312312 * @internal
@@ -326,7 +326,7 @@ export class Offset implements Stage {
326326export class Select implements Stage {
327327 name = 'select' ;
328328
329- constructor ( private projections : Map < string , Expr > ) { }
329+ constructor ( readonly projections : Map < string , Expr > ) { }
330330
331331 /**
332332 * @internal
@@ -346,7 +346,7 @@ export class Select implements Stage {
346346export class Sort implements Stage {
347347 name = 'sort' ;
348348
349- constructor ( private orders : Ordering [ ] ) { }
349+ constructor ( readonly orders : Ordering [ ] ) { }
350350
351351 /**
352352 * @internal
0 commit comments