@@ -194,6 +194,7 @@ export function getDocs<T>(query: Query<T>): Promise<QuerySnapshot<T>> {
194
194
*
195
195
* @param reference - A reference to the document to write.
196
196
* @param data - A map of the fields and values for the document.
197
+ * @throws Error - If the provided input is not a valid Firestore document.
197
198
* @returns A `Promise` resolved once the data has been successfully written
198
199
* to the backend.
199
200
*/
@@ -214,6 +215,7 @@ export function setDoc<T>(
214
215
* @param reference - A reference to the document to write.
215
216
* @param data - A map of the fields and values for the document.
216
217
* @param options - An object to configure the set behavior.
218
+ * @throws Error - If the provided input is not a valid Firestore document.
217
219
* @returns A `Promise` resolved once the data has been successfully written
218
220
* to the backend.
219
221
*/
@@ -263,6 +265,7 @@ export function setDoc<T>(
263
265
* @param data - An object containing the fields and values with which to
264
266
* update the document. Fields can contain dots to reference nested fields
265
267
* within the document.
268
+ * @throws Error - If the provided input is not valid Firestore data.
266
269
* @returns A `Promise` resolved once the data has been successfully written
267
270
* to the backend.
268
271
*/
@@ -287,6 +290,7 @@ export function updateDoc<T>(
287
290
* @param field - The first field to update.
288
291
* @param value - The first value.
289
292
* @param moreFieldsAndValues - Additional key value pairs.
293
+ * @throws Error - If the provided input is not valid Firestore data.
290
294
* @returns A `Promise` resolved once the data has been successfully written
291
295
* to the backend.
292
296
*/
@@ -370,6 +374,7 @@ export function deleteDoc(
370
374
*
371
375
* @param reference - A reference to the collection to add this document to.
372
376
* @param data - An Object containing the data for the new document.
377
+ * @throws Error - If the provided input is not a valid Firestore document.
373
378
* @returns A `Promise` resolved with a `DocumentReference` pointing to the
374
379
* newly created document after it has been written to the backend.
375
380
*/
0 commit comments