The instance of the Firestore database to interact with.
The path of the collection where the document will be added or set.
The data of the document to be added or set.
Optional
id: stringOptional. If provided, the document will be set with this ID. If not, an ID will be automatically generated by Firestore.
A reference to the added or set document.
Generated using TypeDoc
Adds a new document to the specified collection in Firestore. If an ID is provided, the document will be set with that ID; otherwise, an ID will be automatically generated.
Throws
Throws an exception if any error occurs during the document addition or setting process.
Example