diff --git a/dev/src/reference.ts b/dev/src/reference.ts index 79626b479..cad75511a 100644 --- a/dev/src/reference.ts +++ b/dev/src/reference.ts @@ -371,7 +371,7 @@ export class DocumentReference< * * @param {DocumentData} data An object that contains the fields and data to * serialize as the document. - * @throws {Error} If the provided input is not a valid Firestore document. + * @throws {Error} If the provided input is not a valid Firestore document or if the document already exists. * @returns {Promise.} A Promise that resolves with the * write time of this create. * diff --git a/types/firestore.d.ts b/types/firestore.d.ts index ce6c9adb2..18d240a44 100644 --- a/types/firestore.d.ts +++ b/types/firestore.d.ts @@ -1273,7 +1273,7 @@ declare namespace FirebaseFirestore { * provided object values. The write fails if the document already exists * * @param data The object data to serialize as the document. - * @throws Error If the provided input is not a valid Firestore document. + * @throws {Error} If the provided input is not a valid Firestore document or if the document already exists. * @return A Promise resolved with the write time of this create. */ create(data: WithFieldValue): Promise;