UNPKG

veritatisdoloremque

Version:
27 lines (15 loc) 1 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@firebase/firestore](./firestore.md) &gt; [/](./firestore_.md) &gt; [Query](./firestore_.query.md) &gt; [withConverter](./firestore_.query.withconverter.md) ## Query.withConverter() method Applies a custom data converter to this query, allowing you to use your own custom model objects with Firestore. When you call [getDocs()](./firestore_.getdocs.md) with the returned query, the provided converter will convert between Firestore data and your custom type `U`<!-- -->. <b>Signature:</b> ```typescript withConverter(converter: null): Query<DocumentData>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | converter | null | Converts objects to and from Firestore. | <b>Returns:</b> [Query](./firestore_.query.md)<!-- -->&lt;[DocumentData](./firestore_.documentdata.md)<!-- -->&gt; A `Query<U>` that uses the provided converter.