File tree Expand file tree Collapse file tree 3 files changed +5
-19
lines changed Expand file tree Collapse file tree 3 files changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import { FieldPath } from '../model/path';
24
24
export type AggregateType = 'count' | 'avg' | 'sum' ;
25
25
26
26
/**
27
- * TODO
27
+ * Represents an Aggregate to be performed over a query result set.
28
28
*/
29
29
export interface Aggregate {
30
30
readonly fieldPath ?: FieldPath ;
@@ -33,7 +33,7 @@ export interface Aggregate {
33
33
}
34
34
35
35
/**
36
- * TODO
36
+ * Concrete implementation of the Aggregate type.
37
37
*/
38
38
export class AggregateImpl implements Aggregate {
39
39
constructor (
@@ -42,17 +42,3 @@ export class AggregateImpl implements Aggregate {
42
42
readonly fieldPath ?: FieldPath
43
43
) { }
44
44
}
45
-
46
- /**
47
- * TODO
48
- * @param alias
49
- * @param aggregateType
50
- * @param fieldPath
51
- */
52
- export function newAggregate (
53
- alias : string ,
54
- aggregateType : AggregateType ,
55
- fieldPath ?: FieldPath
56
- ) : Aggregate {
57
- return new AggregateImpl ( alias , aggregateType , fieldPath ) ;
58
- }
Original file line number Diff line number Diff line change @@ -448,7 +448,7 @@ export function firestoreClientRunAggregateQuery(
448
448
const deferred = new Deferred < ObjectValue > ( ) ;
449
449
450
450
client . asyncQueue . enqueueAndForget ( async ( ) => {
451
- // TODO(aggregates) update this to use the event manager.
451
+ // TODO (sum/avg) should we update this to use the event manager?
452
452
// Implement and call executeAggregateQueryViaSnapshotListener, similar
453
453
// to the implementation in firestoreClientGetDocumentsViaSnapshotListener
454
454
// above
Original file line number Diff line number Diff line change @@ -28,12 +28,12 @@ export { AggregateType };
28
28
* Represents an aggregation that can be performed by Firestore.
29
29
*/
30
30
// eslint-disable-next-line @typescript-eslint/no-unused-vars
31
- export class AggregateField < R > {
31
+ export class AggregateField < T > {
32
32
/** A type string to uniquely identify instances of this class. */
33
33
readonly type = 'AggregateField' ;
34
34
35
35
/**
36
- * Create a new AggregateField<R >
36
+ * Create a new AggregateField<T >
37
37
* @param _aggregateType Specifies the type of aggregation operation to perform.
38
38
* @param _internalFieldPath Optionally specifies the field that is aggregated.
39
39
* @internal
You can’t perform that action at this time.
0 commit comments