The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/firestore > / > deleteDoc

deleteDoc() function

Deletes the document referred to by the specified DocumentReference.

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 (note that it won't resolve while you're offline).