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 > / > limit

limit() function

Creates a QueryConstraint that only returns the first matching documents.

Signature:

export declare function limit(limit: number): QueryConstraint;

Parameters

Parameter Type Description
limit number The maximum number of items to return.

Returns:

QueryConstraint

The created Query.