Project: /docs/reference/js/_project.yaml
Book: /docs/reference/_book.yaml
page_type: reference
{% comment %}
DO NOT EDIT THIS FILE!
This is generated by the JS SDK team, and any local changes will be
overwritten. Changes should be made in the source code at
https://github.com/firebase/firebase-js-sdk
{% endcomment %}
# QueryLimitConstraint class
A `QueryLimitConstraint` is used to limit the number of documents returned by a Firestore query. `QueryLimitConstraint`s are created by invoking [limit()](./firestore_.md#limit_ec46c78) or [limitToLast()](./firestore_.md#limittolast_ec46c78) and can then be passed to [query()](./firestore_.md#query_9f7b0f4) to create a new query instance that also contains this `QueryLimitConstraint`.
Signature:
```typescript
export declare class QueryLimitConstraint extends QueryConstraint
```
Extends: [QueryConstraint](./firestore_lite.queryconstraint.md#queryconstraint_class)
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [type](./firestore_lite.querylimitconstraint.md#querylimitconstrainttype) | | 'limit' \| 'limitToLast' | The type of this query constraint |
## QueryLimitConstraint.type
The type of this query constraint
Signature:
```typescript
readonly type: 'limit' | 'limitToLast';
```