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 %} # QueryConstraint class A `QueryConstraint` is used to narrow the set of documents returned by a Firestore query. `QueryConstraint`s are created by invoking [where()](./firestore_lite.md#where_0fae4bf), [orderBy()](./firestore_lite.md#orderby_006d61f), [startAt()](./firestore_lite.md#startat_9a4477f), [startAfter()](./firestore_lite.md#startafter_9a4477f), [endBefore()](./firestore_lite.md#endbefore_9a4477f), [endAt()](./firestore_lite.md#endat_9a4477f), [limit()](./firestore_lite.md#limit_ec46c78), [limitToLast()](./firestore_lite.md#limittolast_ec46c78) and can then be passed to [query()](./firestore_lite.md#query_9f7b0f4) to create a new query instance that also contains this `QueryConstraint`. Signature: ```typescript export declare abstract class QueryConstraint ``` ## Properties | Property | Modifiers | Type | Description | | --- | --- | --- | --- | | [type](./firestore_lite.queryconstraint.md#queryconstrainttype) | | [QueryConstraintType](./firestore_lite.md#queryconstrainttype) | The type of this query constraint | ## QueryConstraint.type The type of this query constraint Signature: ```typescript abstract readonly type: QueryConstraintType; ```