@@ -193,8 +193,14 @@ export class FirebaseFirestore {
193
193
* transaction has changed, the updateFunction will be retried. If it fails
194
194
* to commit after 5 attempts, the transaction will fail.
195
195
*
196
+ * The maximum number of writes allowed in a single transaction is 500, but
197
+ * note that each usage of `FieldValue.serverTimestamp()`,
198
+ * `FieldValue.arrayUnion()`, `FieldValue.arrayRemove()`, or
199
+ * `FieldValue.increment()` inside a transaction counts as an additional write.
200
+ *
196
201
* @param updateFunction The function to execute within the transaction
197
202
* context.
203
+ *
198
204
* @return If the transaction completed successfully or was explicitly
199
205
* aborted (by the updateFunction returning a failed Promise), the Promise
200
206
* returned by the updateFunction will be returned here. Else if the
@@ -206,8 +212,14 @@ export class FirebaseFirestore {
206
212
) : Promise < T > ;
207
213
208
214
/**
209
- * Creates a write batch, used for performing multiple writes as a single
210
- * atomic operation.
215
+ * Creates a write batch, used for performing multiple writes as a single
216
+ * atomic operation. The maximum number of writes allowed in a single WriteBatch
217
+ * is 500, but note that each usage of `FieldValue.serverTimestamp()`,
218
+ * `FieldValue.arrayUnion()`, `FieldValue.arrayRemove()`, or
219
+ * `FieldValue.increment()` inside a WriteBatch counts as an additional write.
220
+ *
221
+ * @return
222
+ * A `WriteBatch` that can be used to atomically execute multiple writes.
211
223
*/
212
224
batch ( ) : WriteBatch ;
213
225
0 commit comments