UNPKG

voluptasmollitia

Version:
28 lines (16 loc) 983 B
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@firebase/firestore](./firestore.md) &gt; [/](./firestore_.md) &gt; [WriteBatch](./firestore_.writebatch.md) &gt; [set](./firestore_.writebatch.set.md) ## WriteBatch.set() method Writes to the document referred to by the provided [DocumentReference](./firestore_.documentreference.md)<!-- -->. If the document does not exist yet, it will be created. <b>Signature:</b> ```typescript set<T>(documentRef: DocumentReference<T>, data: T): WriteBatch; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | documentRef | [DocumentReference](./firestore_.documentreference.md)<!-- -->&lt;T&gt; | A reference to the document to be set. | | data | T | An object of the fields and values for the document. | <b>Returns:</b> [WriteBatch](./firestore_.writebatch.md) This `WriteBatch` instance. Used for chaining method calls.