Home > @firebase/firestore > lite > deleteDoc
deleteDoc() function
Deletes the document referred to by the specified DocumentReference
.
The deletion will only be reflected in document reads that occur after the returned Promise resolves. If the client is offline, the delete fails. If you would like to see local modifications or buffer writes until the client is online, use the full Firestore SDK.
Signature:
export declare function deleteDoc(reference: DocumentReference<unknown>): Promise<void>;
Parameters
Parameter | Type | Description |
---|---|---|
reference | DocumentReference<unknown> | A reference to the document to delete. |
Returns:
Promise<void>
A Promise resolved once the document has been successfully deleted from the backend.