UNPKG

veritatisdoloremque

Version:
26 lines (15 loc) 981 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@firebase/firestore](./firestore.md) &gt; [lite](./firestore_lite.md) &gt; [FirestoreDataConverter](./firestore_lite.firestoredataconverter.md) &gt; [toFirestore](./firestore_lite.firestoredataconverter.tofirestore_1.md) ## FirestoreDataConverter.toFirestore() method Called by the Firestore SDK to convert a custom model object of type `T` into a plain Javascript object (suitable for writing directly to the Firestore database). Used with , and with `merge:true` or `mergeFields`<!-- -->. <b>Signature:</b> ```typescript toFirestore(modelObject: Partial<T>, options: SetOptions): DocumentData; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | modelObject | Partial&lt;T&gt; | | | options | [SetOptions](./firestore_lite.setoptions.md) | | <b>Returns:</b> [DocumentData](./firestore_lite.documentdata.md)