File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -404,8 +404,8 @@ class DocumentReference {
404404 * specified in its data argument. Fields omitted from this set() call
405405 * remain untouched.
406406 * @param {Array.<string|FieldPath>= } options.mergeFields - If provided,
407- * set() only replaces the specified field paths. All data at the specified
408- * field paths is fully replaced, while the remaining fields remain untouched.
407+ * set() only replaces the specified field paths. Any field path that is not
408+ * specified is ignored and remains untouched.
409409 * @returns {Promise.<WriteResult> } A Promise that resolves with the
410410 * write time of this set.
411411 *
Original file line number Diff line number Diff line change @@ -187,8 +187,8 @@ class Transaction {
187187 * specified in its data argument. Fields omitted from this set() call
188188 * remain untouched.
189189 * @param {Array.<string|FieldPath>= } options.mergeFields - If provided,
190- * set() only replaces the specified field paths. All data at the specified
191- * field paths is fully replaced, while the remaining fields remain untouched.
190+ * set() only replaces the specified field paths. Any field path that is not
191+ * specified is ignored and remains untouched.
192192 * @returns {Transaction } This Transaction instance. Used for
193193 * chaining method calls.
194194 *
Original file line number Diff line number Diff line change @@ -263,8 +263,8 @@ class WriteBatch {
263263 * specified in its data argument. Fields omitted from this set() call
264264 * remain untouched.
265265 * @param {Array.<string|FieldPath>= } options.mergeFields - If provided,
266- * set() only replaces the specified field paths. All data at the specified
267- * field paths is fully replaced, while the remaining fields remain untouched.
266+ * set() only replaces the specified field paths. Any field path that is not
267+ * specified is ignored and remains untouched.
268268 * @returns {WriteBatch } This WriteBatch instance. Used for chaining
269269 * method calls.
270270 *
Original file line number Diff line number Diff line change @@ -365,20 +365,23 @@ declare namespace FirebaseFirestore {
365365 * An options object that configures the behavior of `set()` calls in
366366 * `DocumentReference`, `WriteBatch` and `Transaction`. These calls can be
367367 * configured to perform granular merges instead of overwriting the target
368- * documents in their entirety by providing a `SetOptions` with `merge: true` .
368+ * documents in their entirety.
369369 */
370370 export interface SetOptions {
371371 /**
372- * Changes the behavior of a set() call to deeply merge the values specified
372+ * Changes the behavior of a set() call to only replace the values specified
373373 * in its data argument. Fields omitted from the set() call remain
374374 * untouched.
375375 */
376376 readonly merge ?: boolean ;
377377
378378 /**
379- * Changes the behavior of set() calls to only replace the specified
380- * field paths. All data at the specified field paths is fully replaced,
381- * while the remaining fields remain untouched.
379+ * Changes the behavior of set() calls to only replace the specified field
380+ * paths. Any field path that is not specified is ignored and remains
381+ * untouched.
382+ *
383+ * It is an error to pass a SetOptions object to a set() call that is
384+ * missing a value for any of the fields specified here.
382385 */
383386 readonly mergeFields ?: ( string | FieldPath ) [ ] ;
384387 }
You can’t perform that action at this time.
0 commit comments