voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
29 lines (16 loc) • 1.09 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [lite](./firestore_lite.md) > [deleteDoc](./firestore_lite.deletedoc.md)
## 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.
<b>Signature:</b>
```typescript
export declare function deleteDoc(reference: DocumentReference<unknown>): Promise<void>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| reference | [DocumentReference](./firestore_lite.documentreference.md)<!-- --><unknown> | A reference to the document to delete. |
<b>Returns:</b>
Promise<void>
A Promise resolved once the document has been successfully deleted from the backend.