@@ -598,6 +598,7 @@ declare namespace FirebaseFirestore {
598
598
*
599
599
* @param documentRef A reference to the document to be create.
600
600
* @param data The object data to serialize as the document.
601
+ * @throws Error If the provided input is not a valid Firestore document.
601
602
* @return This `Transaction` instance. Used for chaining method calls.
602
603
*/
603
604
create < T > (
@@ -613,6 +614,7 @@ declare namespace FirebaseFirestore {
613
614
* @param documentRef A reference to the document to be set.
614
615
* @param data An object of the fields and values for the document.
615
616
* @param options An object to configure the set behavior.
617
+ * @throws Error If the provided input is not a valid Firestore document.
616
618
* @return This `Transaction` instance. Used for chaining method calls.
617
619
*/
618
620
set < T > (
@@ -637,6 +639,7 @@ declare namespace FirebaseFirestore {
637
639
* @param data An object containing the fields and values with which to
638
640
* update the document.
639
641
* @param precondition A Precondition to enforce on this update.
642
+ * @throws Error If the provided input is not valid Firestore data.
640
643
* @return This `Transaction` instance. Used for chaining method calls.
641
644
*/
642
645
update < T > (
@@ -662,6 +665,7 @@ declare namespace FirebaseFirestore {
662
665
* @param fieldsOrPrecondition An alternating list of field paths and values
663
666
* to update, optionally followed by a `Precondition` to enforce on this
664
667
* update.
668
+ * @throws Error If the provided input is not valid Firestore data.
665
669
* @return This `Transaction` instance. Used for chaining method calls.
666
670
*/
667
671
update (
@@ -700,6 +704,7 @@ declare namespace FirebaseFirestore {
700
704
* @param documentRef A reference to the document to be
701
705
* created.
702
706
* @param data The object to serialize as the document.
707
+ * @throws Error If the provided input is not a valid Firestore document.
703
708
* @returns A promise that resolves with the result of the write. If the
704
709
* write fails, the promise is rejected with a
705
710
* [BulkWriterError]{@link BulkWriterError}.
@@ -747,6 +752,7 @@ declare namespace FirebaseFirestore {
747
752
* @param options.mergeFields - If provided,
748
753
* set() only replaces the specified field paths. Any field path that is not
749
754
* specified is ignored and remains untouched.
755
+ * @throws Error If the provided input is not a valid Firestore document.
750
756
* @returns A promise that resolves with the result of the write. If the
751
757
* write fails, the promise is rejected with a
752
758
* [BulkWriterError]{@link BulkWriterError}.
@@ -780,6 +786,7 @@ declare namespace FirebaseFirestore {
780
786
* @param data An object containing the fields and values with which to
781
787
* update the document.
782
788
* @param precondition A Precondition to enforce on this update.
789
+ * @throws Error If the provided input is not valid Firestore data.
783
790
* @returns A promise that resolves with the result of the write. If the
784
791
* write fails, the promise is rejected with a
785
792
* [BulkWriterError]{@link BulkWriterError}.
@@ -809,7 +816,9 @@ declare namespace FirebaseFirestore {
809
816
* @param field The first field to update.
810
817
* @param value The first value
811
818
* @param fieldsOrPrecondition An alternating list of field paths and values
812
- * to update, optionally followed a `Precondition` to enforce on this update.
819
+ * to update, optionally followed a `Precondition` to enforce on this
820
+ * update.
821
+ * @throws Error If the provided input is not valid Firestore data;
813
822
* @returns A promise that resolves with the result of the write. If the
814
823
* write fails, the promise is rejected with a
815
824
* [BulkWriterError]{@link BulkWriterError}.
@@ -953,6 +962,7 @@ declare namespace FirebaseFirestore {
953
962
*
954
963
* @param documentRef A reference to the document to be created.
955
964
* @param data The object data to serialize as the document.
965
+ * @throws Error If the provided input is not a valid Firestore document.
956
966
* @return This `WriteBatch` instance. Used for chaining method calls.
957
967
*/
958
968
create < T > (
@@ -968,6 +978,7 @@ declare namespace FirebaseFirestore {
968
978
* @param documentRef A reference to the document to be set.
969
979
* @param data An object of the fields and values for the document.
970
980
* @param options An object to configure the set behavior.
981
+ * @throws Error If the provided input is not a valid Firestore document.
971
982
* @return This `WriteBatch` instance. Used for chaining method calls.
972
983
*/
973
984
set < T > (
@@ -992,6 +1003,7 @@ declare namespace FirebaseFirestore {
992
1003
* @param data An object containing the fields and values with which to
993
1004
* update the document.
994
1005
* @param precondition A Precondition to enforce on this update.
1006
+ * @throws Error If the provided input is not valid Firestore data.
995
1007
* @return This `WriteBatch` instance. Used for chaining method calls.
996
1008
*/
997
1009
update < T > (
@@ -1015,7 +1027,9 @@ declare namespace FirebaseFirestore {
1015
1027
* @param field The first field to update.
1016
1028
* @param value The first value
1017
1029
* @param fieldsOrPrecondition An alternating list of field paths and values
1018
- * to update, optionally followed a `Precondition` to enforce on this update.
1030
+ * to update, optionally followed a `Precondition` to enforce on this
1031
+ * update.
1032
+ * @throws Error If the provided input is not valid Firestore data.
1019
1033
* @return This `WriteBatch` instance. Used for chaining method calls.
1020
1034
*/
1021
1035
update (
@@ -1174,6 +1188,7 @@ declare namespace FirebaseFirestore {
1174
1188
* provided object values. The write fails if the document already exists
1175
1189
*
1176
1190
* @param data The object data to serialize as the document.
1191
+ * @throws Error If the provided input is not a valid Firestore document.
1177
1192
* @return A Promise resolved with the write time of this create.
1178
1193
*/
1179
1194
create ( data : WithFieldValue < T > ) : Promise < WriteResult > ;
@@ -1185,6 +1200,7 @@ declare namespace FirebaseFirestore {
1185
1200
*
1186
1201
* @param data A map of the fields and values for the document.
1187
1202
* @param options An object to configure the set behavior.
1203
+ * @throws Error If the provided input is not a valid Firestore document.
1188
1204
* @return A Promise resolved with the write time of this set.
1189
1205
*/
1190
1206
set (
@@ -1203,6 +1219,7 @@ declare namespace FirebaseFirestore {
1203
1219
* @param data An object containing the fields and values with which to
1204
1220
* update the document.
1205
1221
* @param precondition A Precondition to enforce on this update.
1222
+ * @throws Error If the provided input is not valid Firestore data.
1206
1223
* @return A Promise resolved with the write time of this update.
1207
1224
*/
1208
1225
update (
@@ -1225,6 +1242,7 @@ declare namespace FirebaseFirestore {
1225
1242
* @param moreFieldsOrPrecondition An alternating list of field paths and
1226
1243
* values to update, optionally followed by a `Precondition` to enforce on
1227
1244
* this update.
1245
+ * @throws Error If the provided input is not valid Firestore data.
1228
1246
* @return A Promise resolved with the write time of this update.
1229
1247
*/
1230
1248
update (
@@ -1816,6 +1834,7 @@ declare namespace FirebaseFirestore {
1816
1834
* it a document ID automatically.
1817
1835
*
1818
1836
* @param data An Object containing the data for the new document.
1837
+ * @throws Error If the provided input is not a valid Firestore document.
1819
1838
* @return A Promise resolved with a `DocumentReference` pointing to the
1820
1839
* newly created document after it has been written to the backend.
1821
1840
*/
0 commit comments