Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
3b49905
wip: pipelines
MarkDuckworth Oct 14, 2024
a30f9ae
Fix circular deps
MarkDuckworth Oct 14, 2024
dbc7c12
Expose pipeline in lite-api
MarkDuckworth Oct 16, 2024
27213de
Refactoring to support lite-api
MarkDuckworth Oct 16, 2024
0676397
api-review folder updates
MarkDuckworth Oct 16, 2024
2cd396a
Adding missing protobufjs-cli
MarkDuckworth Oct 16, 2024
0c76ca0
Update API reports
MarkDuckworth Oct 16, 2024
5e9774b
fixes
MarkDuckworth Oct 16, 2024
22913b1
Merge branch 'markduckworth/ppl' of github.com:firebase/firebase-js-s…
MarkDuckworth Oct 16, 2024
2f3d48a
yarn.lock
MarkDuckworth Oct 16, 2024
076236e
Fixes. Passing integration tests.
MarkDuckworth Oct 28, 2024
8af0c57
Update API reports
MarkDuckworth Oct 28, 2024
57d1bf9
Move call to readUserData for code readability
MarkDuckworth Oct 29, 2024
022d276
Merge branch 'markduckworth/ppl' of github.com:firebase/firebase-js-s…
MarkDuckworth Oct 29, 2024
4f9a5fc
Made ProtoSerializable generic and used by Pipeline and Stage
MarkDuckworth Oct 29, 2024
6717ed4
Fixing build and lint issues
MarkDuckworth Oct 31, 2024
3ab4f5c
Update API reports
MarkDuckworth Oct 31, 2024
fc4f263
Merge branch 'main' of github.com:firebase/firebase-js-sdk into markd…
MarkDuckworth Oct 31, 2024
fd20eff
Adding new bundle size test
MarkDuckworth Oct 31, 2024
90a5e3c
experimentation with augmentation for ppl
MarkDuckworth Nov 4, 2024
585d52e
Update API reports
MarkDuckworth Nov 4, 2024
4b67f8a
Documentation and .d.ts improvements
MarkDuckworth Nov 5, 2024
26c76f3
Merge branch 'markduckworth/ppl-augment' of github.com:firebase/fireb…
MarkDuckworth Nov 5, 2024
ca0ffd9
Update API reports
MarkDuckworth Nov 5, 2024
2d386c8
Update the bundle definition for the pipeline bundle test
MarkDuckworth Nov 6, 2024
c621b81
Update the bundle definition adding a pipeline test with and function
MarkDuckworth Nov 6, 2024
773ab02
Typo
MarkDuckworth Nov 6, 2024
ad82093
Merge branch 'markduckworth/ppl-augment' of github.com:firebase/fireb…
MarkDuckworth Nov 6, 2024
682997d
And/or overloads. Pipeline serialization for console.
MarkDuckworth Nov 11, 2024
8eb9082
Cast Firestore
MarkDuckworth Nov 11, 2024
6a2abf3
And/or overloads
MarkDuckworth Nov 11, 2024
422cbd6
Update API reports
MarkDuckworth Nov 11, 2024
c78bae9
Fix and/or overloads
MarkDuckworth Nov 13, 2024
56c4e4a
Merge branch 'markduckworth/ppl-augment' of github.com:firebase/fireb…
MarkDuckworth Nov 13, 2024
bcfaf2a
Modular-style pipeline and execute methods for experimentation. Plus …
MarkDuckworth Nov 13, 2024
5425705
Update API reports
MarkDuckworth Nov 13, 2024
9a1ffa6
Merge branch 'console' of github.com:firebase/firebase-js-sdk into fe…
MarkDuckworth Nov 13, 2024
edc1ea5
Docgen
MarkDuckworth Nov 13, 2024
6859582
Merge branch 'feat/pipelines' of github.com:firebase/firebase-js-sdk …
MarkDuckworth Nov 13, 2024
9c4d556
license headers
MarkDuckworth Nov 13, 2024
1aef450
docgen
MarkDuckworth Nov 13, 2024
b20afe6
docs-devsite fix
MarkDuckworth Nov 13, 2024
877bf3c
Skipping pipeline tests for CI
MarkDuckworth Nov 13, 2024
1f7b071
Update API reports
MarkDuckworth Nov 13, 2024
d9b6e9a
reverting changes to docs-devsite
MarkDuckworth Nov 13, 2024
18e3477
Merge branch 'feat/pipelines' of github.com:firebase/firebase-js-sdk …
MarkDuckworth Nov 13, 2024
703b18f
revert and/or overloads
MarkDuckworth Nov 13, 2024
75e35c8
Update API reports
MarkDuckworth Nov 13, 2024
4bb953a
Fix bundle definition
MarkDuckworth Nov 15, 2024
8b6855c
Merge branch 'feat/pipelines' of github.com:firebase/firebase-js-sdk …
MarkDuckworth Nov 15, 2024
92c651f
Fix imports
MarkDuckworth Nov 15, 2024
cc3146c
Re-adding circular dependency check.
MarkDuckworth Nov 19, 2024
d2e8d60
Addressing review comments.
MarkDuckworth Nov 19, 2024
fafadbc
PPL to Console (#8638)
MarkDuckworth Nov 20, 2024
0750f35
Merge branch 'console' of github.com:firebase/firebase-js-sdk into fe…
MarkDuckworth Nov 20, 2024
ecd931d
New bundle analysis to evaluate useFirestorePipelines vs execute
MarkDuckworth Nov 25, 2024
63b8854
Fix build. Finish rename. Rename useFirestorePipelines to useFluentPi…
MarkDuckworth Nov 26, 2024
a9a0b82
Remove type references from the core Firestore API surface. This will…
MarkDuckworth Dec 10, 2024
df90a2e
Fixes for Constant.of(...) (#8677)
MarkDuckworth Dec 18, 2024
fb5df42
PPL multiple entry points (#8717)
MarkDuckworth Jan 27, 2025
09508e9
Merge branch 'main' of github.com:firebase/firebase-js-sdk into feat/…
MarkDuckworth Mar 12, 2025
d18310a
Markduckworth/ppl mep (#8801)
MarkDuckworth Mar 21, 2025
b180898
Port improved whereConditionsFromCursor from Android
MarkDuckworth Mar 26, 2025
6cc2ee6
Port improved whereConditionsFromCursor from Android (#8867)
MarkDuckworth Mar 26, 2025
8e9fdbe
Merge branch 'feat/pipelines' of github.com:firebase/firebase-js-sdk …
MarkDuckworth Apr 3, 2025
609d082
Pipeline and test cleanup
MarkDuckworth Apr 8, 2025
3d6bbf3
Test fixes and re-enabling tests for features that were added on backend
MarkDuckworth Apr 8, 2025
32ee331
Additional test cleanup
MarkDuckworth Apr 8, 2025
7532899
Merge commit '88a8055808bdbd1c75011a94d11062460027d931' into feat/pip…
MarkDuckworth Apr 8, 2025
bb8fc27
fix tests and enable only pipeline tests
MarkDuckworth Apr 8, 2025
03eb22e
Comment cleanup
MarkDuckworth Apr 11, 2025
1645cd6
Cleanup
MarkDuckworth Apr 29, 2025
41bde42
Build and test fixes
MarkDuckworth Jun 16, 2025
33a4a2d
Merge branch 'main' of github.com:firebase/firebase-js-sdk into feat/…
MarkDuckworth Jun 27, 2025
2802f8a
Merge branch 'main' of github.com:firebase/firebase-js-sdk into feat/…
MarkDuckworth Sep 29, 2025
c407cb9
Implementing features from API audit and node backport (#9284)
MarkDuckworth Oct 8, 2025
beda76e
Fix pipelines CI (#9306)
MarkDuckworth Oct 9, 2025
3456581
fix typings:public script for firestore
MarkDuckworth Oct 10, 2025
d34d930
only run pipeline tests when pointing to the enterprise db
MarkDuckworth Oct 9, 2025
adba599
send api key to DBE requests (#9331)
MarkDuckworth Oct 20, 2025
0ec6389
backport fixes in the console to feat/pipelines (#9340)
MarkDuckworth Oct 22, 2025
07ca9c6
Throw on duplicate alias (#9343)
MarkDuckworth Oct 28, 2025
0b2845a
Pipeline fix tests and exports (#9342)
MarkDuckworth Oct 28, 2025
319a396
Add support for sending the API key for web channel streams (#9354)
MarkDuckworth Oct 29, 2025
0aca735
Merge branch 'main' of github.com:firebase/firebase-js-sdk into feat/…
MarkDuckworth Oct 29, 2025
3dc7b96
add beta tags to pipelines api. Add missing tsdoc comments
MarkDuckworth Oct 29, 2025
d571641
Yarn format
MarkDuckworth Oct 29, 2025
8512f64
add functions timestampTrunc, split, and type
MarkDuckworth Oct 31, 2025
29e1965
Add valueToTrim parameter to trim
MarkDuckworth Oct 31, 2025
f607f00
pass value to trim
MarkDuckworth Oct 31, 2025
d3eed35
Add Bytes to arg type for trim
MarkDuckworth Oct 31, 2025
5206828
clean up integration tests so they pass in classic and enterprise DBs
MarkDuckworth Nov 3, 2025
659ee21
Merge branch 'main' of github.com:firebase/firebase-js-sdk into feat/…
MarkDuckworth Nov 3, 2025
7fea6f4
Missing file
MarkDuckworth Nov 3, 2025
8561514
cleanup
MarkDuckworth Nov 3, 2025
f9c4cde
Fix api review files and missing export TimeGranularity
MarkDuckworth Nov 5, 2025
e4cdd2e
fixed private constructor on aggregatefunction
MarkDuckworth Nov 5, 2025
f4c72a7
Add _fieldsProto() method to snapshot and result classes for console …
MarkDuckworth Nov 10, 2025
f817c54
Release 12.6.0 - Merge branch 'main' of github.com:firebase/firebase-…
MarkDuckworth Nov 14, 2025
6a968aa
API report review and fixes
MarkDuckworth Dec 4, 2025
82cda06
yarn format
MarkDuckworth Dec 4, 2025
7eddfa3
Fixes for firebase-js-sdk/integration/firestore
MarkDuckworth Dec 4, 2025
59ee6f8
Changed the typings in firestore's package.json so that it does not p…
MarkDuckworth Dec 5, 2025
664b284
cleanup duplicate code injected in the gulpfile
MarkDuckworth Dec 5, 2025
a987459
A different approach to getting public typings for firebase-js-sdk/in…
MarkDuckworth Dec 5, 2025
bbdd95e
Ensure that typings:public runs before any build
MarkDuckworth Dec 8, 2025
b3d830c
fix leak of STAT_EVENT subscription in WebChannelConnection
MarkDuckworth Dec 8, 2025
5c82f22
disable debug logging
MarkDuckworth Dec 8, 2025
e85bfcf
Merge branch 'main' of github.com:firebase/firebase-js-sdk into feat/…
MarkDuckworth Dec 8, 2025
e2b02a6
Move tests using captureExistenceFilterMismatches into the api_intern…
MarkDuckworth Dec 10, 2025
f4fddc6
remove .only
MarkDuckworth Dec 10, 2025
55a680f
Correct the invocation of addEqualityMatcher in array transforms test
MarkDuckworth Dec 10, 2025
eaa36f3
Ported BooleanExpression changes from public preview
MarkDuckworth Dec 10, 2025
a6d3cb1
linting
MarkDuckworth Dec 10, 2025
ac7641e
Squashed commit of the following:
MarkDuckworth Dec 10, 2025
79ce03b
Fix for test:travis with equalityMatcher override
MarkDuckworth Dec 12, 2025
d3b7828
fixed docs devsite for pipelines
MarkDuckworth Dec 18, 2025
3e1a5a8
changeset
MarkDuckworth Dec 18, 2025
8b43717
Minor bump for firebase too
MarkDuckworth Dec 18, 2025
7feb5af
Add docs devsite for lite pipelines
MarkDuckworth Dec 18, 2025
d5ae01d
Add api extractor config for lite pipelines
MarkDuckworth Dec 18, 2025
b58eec9
copyright date
MarkDuckworth Dec 19, 2025
c08f63d
linting
MarkDuckworth Dec 19, 2025
19e4895
Updated copyrights
MarkDuckworth Dec 22, 2025
f5b67d7
removed files
MarkDuckworth Dec 22, 2025
3f68e31
Add missing example tags to tsdoc
MarkDuckworth Jan 6, 2026
515f9a1
Add missing example tags and rename return tag to returns
MarkDuckworth Jan 6, 2026
0ca87b4
Fixing TSDoc tags
MarkDuckworth Jan 7, 2026
f0dfa6c
More TSDoc syntax cleanup: fix links, fix param tags, fix invalid tags
MarkDuckworth Jan 7, 2026
596d0d6
Merge branch 'main' of github.com:firebase/firebase-js-sdk into markd…
MarkDuckworth Jan 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
828 changes: 0 additions & 828 deletions docs-devsite/_toc.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions docs-devsite/firestore_.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ https://github.com/firebase/firebase-js-sdk
| [enableIndexedDbPersistence(firestore, persistenceSettings)](./firestore_.md#enableindexeddbpersistence_224174f) | Attempts to enable persistent storage, if possible.<!-- -->On failure, <code>enableIndexedDbPersistence()</code> will reject the promise or throw an exception. There are several reasons why this can fail, which can be identified by the <code>code</code> on the error.<!-- -->\* failed-precondition: The app is already open in another browser tab. \* unimplemented: The browser is incompatible with the offline persistence implementation.<!-- -->Note that even after a failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled.<!-- -->Note: <code>enableIndexedDbPersistence()</code> must be called before any other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore_fc7d200)<!-- -->, [getFirestore()](./firestore_.md#getfirestore) or [clearIndexedDbPersistence()](./firestore_.md#clearindexeddbpersistence_231a8e0)<!-- -->.<!-- -->Persistence cannot be used in a Node.js environment. |
| [enableMultiTabIndexedDbPersistence(firestore)](./firestore_.md#enablemultitabindexeddbpersistence_231a8e0) | Attempts to enable multi-tab persistent storage, if possible. If enabled across all tabs, all operations share access to local persistence, including shared execution of queries and latency-compensated local document updates across all connected instances.<!-- -->On failure, <code>enableMultiTabIndexedDbPersistence()</code> will reject the promise or throw an exception. There are several reasons why this can fail, which can be identified by the <code>code</code> on the error.<!-- -->\* failed-precondition: The app is already open in another browser tab and multi-tab is not enabled. \* unimplemented: The browser is incompatible with the offline persistence implementation.<!-- -->Note that even after a failure, the [Firestore](./firestore_.firestore.md#firestore_class) instance will remain usable, however offline persistence will be disabled. |
| [enableNetwork(firestore)](./firestore_.md#enablenetwork_231a8e0) | Re-enables use of the network for this [Firestore](./firestore_.firestore.md#firestore_class) instance after a prior call to [disableNetwork()](./firestore_.md#disablenetwork_231a8e0)<!-- -->. |
| [getPersistentCacheIndexManager(firestore)](./firestore_.md#getpersistentcacheindexmanager_231a8e0) | Returns the PersistentCache Index Manager used by the given <code>Firestore</code> object. The <code>PersistentCacheIndexManager</code> instance, or <code>null</code> if local persistent storage is not in use. |
| [getPersistentCacheIndexManager(firestore)](./firestore_.md#getpersistentcacheindexmanager_231a8e0) | Returns the PersistentCache Index Manager used by the given <code>Firestore</code> object. |
| [loadBundle(firestore, bundleData)](./firestore_.md#loadbundle_bec5b75) | Loads a Firestore bundle into the local cache. |
| [namedQuery(firestore, name)](./firestore_.md#namedquery_6438876) | Reads a Firestore [Query](./firestore_.query.md#query_class) from local cache, identified by the given name.<!-- -->The named queries are packaged into bundles on the server side (along with resulting documents), and loaded to local cache using <code>loadBundle</code>. Once in local cache, use this method to extract a [Query](./firestore_.query.md#query_class) by name. |
| [onSnapshotResume(firestore, snapshotJson, onNext, onError, onCompletion, converter)](./firestore_.md#onsnapshotresume_7c84f5e) | Attaches a listener for <code>QuerySnapshot</code> events based on data generated by invoking [QuerySnapshot.toJSON()](./firestore_.querysnapshot.md#querysnapshottojson) You may either pass individual <code>onNext</code> and <code>onError</code> callbacks or pass a single observer object with <code>next</code> and <code>error</code> callbacks. The listener can be cancelled by calling the function that is returned when <code>onSnapshot</code> is called.<!-- -->NOTE: Although an <code>onCompletion</code> callback can be provided, it will never be called because the snapshot stream is never-ending. |
Expand Down Expand Up @@ -170,7 +170,7 @@ https://github.com/firebase/firebase-js-sdk
| [SnapshotMetadata](./firestore_.snapshotmetadata.md#snapshotmetadata_class) | Metadata about a snapshot, describing the state of the snapshot. |
| [Timestamp](./firestore_.timestamp.md#timestamp_class) | A <code>Timestamp</code> represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time.<!-- -->It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.<!-- -->For examples and further specifications, refer to the [Timestamp definition](https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto)<!-- -->. |
| [Transaction](./firestore_.transaction.md#transaction_class) | A reference to a transaction.<!-- -->The <code>Transaction</code> object passed to a transaction's <code>updateFunction</code> provides the methods to read and write data within the transaction context. See [runTransaction()](./firestore_.md#runtransaction_6f03ec4)<!-- -->. |
| [VectorValue](./firestore_.vectorvalue.md#vectorvalue_class) | Represents a vector type in Firestore documents. Create an instance with <code>[vector()](./firestore_.md#vector_0dbdaf2)</code>. VectorValue |
| [VectorValue](./firestore_.vectorvalue.md#vectorvalue_class) | Represents a vector type in Firestore documents. Create an instance with <code>[vector()](./firestore_.md#vector_0dbdaf2)</code>. |
| [WriteBatch](./firestore_.writebatch.md#writebatch_class) | A write batch, used to perform multiple writes as a single atomic unit.<!-- -->A <code>WriteBatch</code> object can be acquired by calling [writeBatch()](./firestore_.md#writebatch_231a8e0)<!-- -->. It provides methods for adding writes to the write batch. None of the writes will be committed (or visible locally) until [WriteBatch.commit()](./firestore_.writebatch.md#writebatchcommit) is called. |

## Interfaces
Expand Down Expand Up @@ -660,8 +660,6 @@ A `Promise` that is resolved once the network has been enabled.

Returns the PersistentCache Index Manager used by the given `Firestore` object.

The `PersistentCacheIndexManager` instance, or `null` if local persistent storage is not in use.

<b>Signature:</b>

```typescript
Expand All @@ -678,6 +676,8 @@ export declare function getPersistentCacheIndexManager(firestore: Firestore): Pe

[PersistentCacheIndexManager](./firestore_.persistentcacheindexmanager.md#persistentcacheindexmanager_class) \| null

The `PersistentCacheIndexManager` instance, or `null` if local persistent storage is not in use.

### loadBundle(firestore, bundleData) {:#loadbundle_bec5b75}

Loads a Firestore bundle into the local cache.
Expand Down
2 changes: 0 additions & 2 deletions docs-devsite/firestore_.vectorvalue.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ https://github.com/firebase/firebase-js-sdk
# VectorValue class
Represents a vector type in Firestore documents. Create an instance with <code>[vector()](./firestore_.md#vector_0dbdaf2)</code>.

VectorValue

<b>Signature:</b>

```typescript
Expand Down
2 changes: 1 addition & 1 deletion docs-devsite/firestore_lite.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ https://github.com/firebase/firebase-js-sdk
| [QueryStartAtConstraint](./firestore_lite.querystartatconstraint.md#querystartatconstraint_class) | A <code>QueryStartAtConstraint</code> is used to exclude documents from the start of a result set returned by a Firestore query. <code>QueryStartAtConstraint</code>s are created by invoking [startAt()](./firestore_.md#startat_9a4477f) or [startAfter()](./firestore_.md#startafter_9a4477f) and can then be passed to [query()](./firestore_.md#query_9f7b0f4) to create a new query instance that also contains this <code>QueryStartAtConstraint</code>. |
| [Timestamp](./firestore_lite.timestamp.md#timestamp_class) | A <code>Timestamp</code> represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time.<!-- -->It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.<!-- -->For examples and further specifications, refer to the [Timestamp definition](https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto)<!-- -->. |
| [Transaction](./firestore_lite.transaction.md#transaction_class) | A reference to a transaction.<!-- -->The <code>Transaction</code> object passed to a transaction's <code>updateFunction</code> provides the methods to read and write data within the transaction context. See [runTransaction()](./firestore_.md#runtransaction_6f03ec4)<!-- -->. |
| [VectorValue](./firestore_lite.vectorvalue.md#vectorvalue_class) | Represents a vector type in Firestore documents. Create an instance with <code>[vector()](./firestore_.md#vector_0dbdaf2)</code>. VectorValue |
| [VectorValue](./firestore_lite.vectorvalue.md#vectorvalue_class) | Represents a vector type in Firestore documents. Create an instance with <code>[vector()](./firestore_.md#vector_0dbdaf2)</code>. |
| [WriteBatch](./firestore_lite.writebatch.md#writebatch_class) | A write batch, used to perform multiple writes as a single atomic unit.<!-- -->A <code>WriteBatch</code> object can be acquired by calling [writeBatch()](./firestore_.md#writebatch_231a8e0)<!-- -->. It provides methods for adding writes to the write batch. None of the writes will be committed (or visible locally) until [WriteBatch.commit()](./firestore_.writebatch.md#writebatchcommit) is called. |

## Interfaces
Expand Down
2 changes: 0 additions & 2 deletions docs-devsite/firestore_lite.vectorvalue.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ https://github.com/firebase/firebase-js-sdk
# VectorValue class
Represents a vector type in Firestore documents. Create an instance with <code>[vector()](./firestore_.md#vector_0dbdaf2)</code>.

VectorValue

<b>Signature:</b>

```typescript
Expand Down
30 changes: 14 additions & 16 deletions docs-devsite/firestore_lite_pipelines.aggregatefunction.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,7 @@ export declare class AggregateFunction

| Method | Modifiers | Description |
| --- | --- | --- |
| [as(name)](./firestore_lite_pipelines.aggregatefunction.md#aggregatefunctionas) | | <b><i>(Public Preview)</i></b> Assigns an alias to this AggregateFunction. The alias specifies the name that the aggregated value will have in the output document.
```typescript
// Calculate the average price of all items and assign it the alias "averagePrice".
firestore.pipeline().collection("items")
.aggregate(field("price").average().as("averagePrice"));

```
|
| [as(name)](./firestore_lite_pipelines.aggregatefunction.md#aggregatefunctionas) | | <b><i>(Public Preview)</i></b> Assigns an alias to this AggregateFunction. The alias specifies the name that the aggregated value will have in the output document. |

## AggregateFunction.(constructor)

Expand Down Expand Up @@ -84,13 +77,6 @@ exprType: ExpressionType;

Assigns an alias to this AggregateFunction. The alias specifies the name that the aggregated value will have in the output document.

```typescript
// Calculate the average price of all items and assign it the alias "averagePrice".
firestore.pipeline().collection("items")
.aggregate(field("price").average().as("averagePrice"));

```

<b>Signature:</b>

```typescript
Expand All @@ -101,9 +87,21 @@ as(name: string): AliasedAggregate;

| Parameter | Type | Description |
| --- | --- | --- |
| name | string | The alias to assign to this AggregateFunction. A new that wraps this AggregateFunction and associates it with the provided alias. |
| name | string | The alias to assign to this AggregateFunction. |

<b>Returns:</b>

[AliasedAggregate](./firestore_lite_pipelines.aliasedaggregate.md#aliasedaggregate_class)

A new [AliasedAggregate](./firestore_pipelines.aliasedaggregate.md#aliasedaggregate_class) that wraps this AggregateFunction and associates it with the provided alias.

### Example


```typescript
// Calculate the average price of all items and assign it the alias "averagePrice".
firestore.pipeline().collection("items")
.aggregate(field("price").average().as("averagePrice"));

```

Loading
Loading