Home > @firebase/firestore > / > endBefore
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.
Signature:
export declare function endBefore(snapshot: DocumentSnapshot<unknown>): QueryConstraint;
Parameters
| Parameter | Type | Description |
|---|---|---|
| snapshot | DocumentSnapshot<unknown> | The snapshot of the document to end before. |
Returns:
A QueryConstraint to pass to query()