voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
27 lines (15 loc) • 665 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [/](./firestore_.md) > [limit](./firestore_.limit.md)
## limit() function
Creates a `QueryConstraint` that only returns the first matching documents.
<b>Signature:</b>
```typescript
export declare function limit(limit: number): QueryConstraint;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| limit | number | The maximum number of items to return. |
<b>Returns:</b>
[QueryConstraint](./firestore_.queryconstraint.md)
The created `Query`<!-- -->.