Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

deleteDoc

Deletes the document referred to by the specified DocumentReference.

Note that the returned Promise does not resolve until the document is successfully deleted from the remote Firestore backend and, similarly, is not rejected until the remote Firestore backend reports an error deleting the given document. So if the client cannot reach the backend (for example, due to being offline) then the returned Promise will not resolve for a potentially-long time (for example, until the client has gone back online). That being said, the given data will be immediately deleted from the local cache and will be reflected in future "get" operations as if it had been successfully deleted from the remote Firestore server, a feature of Firestore called "latency compensation". The document will eventually be deleted from the remote Firestore backend once a connection can be established. Therefore, it is usually undesirable to await the Promise returned from this function because the indefinite amount of time before which the promise resolves or rejects can block application logic unnecessarily.

function deleteDoc<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>): Promise<void>;
§
deleteDoc<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>): Promise<void>
[src]

§Type Parameters

§
AppModelType
[src]
§
DbModelType extends DocumentData
[src]

§Parameters

§
reference: DocumentReference<AppModelType, DbModelType>
[src]
  • A reference to the document to delete.

§Return Type

§
Promise<void>
[src]

A Promise that resolves once the document has been successfully deleted from the backend or rejects once the backend reports an error deleting the document.