The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/firestore > lite > endAt

endAt() function

Creates a QueryConstraint that modifies the result set to end at the provided document (inclusive). 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 endAt(snapshot: DocumentSnapshot<unknown>): QueryConstraint;

Parameters

Parameter Type Description
snapshot DocumentSnapshot<unknown> The snapshot of the document to end at.

Returns:

QueryConstraint

A QueryConstraint to pass to query()