voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
27 lines (15 loc) • 979 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [lite](./firestore_lite.md) > [endBefore](./firestore_lite.endbefore.md)
## endBefore() function
Creates a `QueryConstraint` that modifies the result set to end before the provided document (exclusive). The end position is relative to the order of the query. The document must contain all of the fields provided in the orderBy of the query.
<b>Signature:</b>
```typescript
export declare function endBefore(snapshot: DocumentSnapshot<unknown>): QueryConstraint;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| snapshot | [DocumentSnapshot](./firestore_lite.documentsnapshot.md)<!-- --><unknown> | The snapshot of the document to end before. |
<b>Returns:</b>
[QueryConstraint](./firestore_lite.queryconstraint.md)
A `QueryConstraint` to pass to `query()`