delete method

JSPromise<WriteResult> delete(
  1. DocumentReference documentRef, [
  2. Precondition precondition
])

Delete a document from the database.

@param documentRef A reference to the document to be deleted. @param precondition A precondition to enforce for this delete. @param precondition.lastUpdateTime If set, enforces that the document was last updated at lastUpdateTime. Fails the batch if the document doesn't exist or was last updated at a different time. @param precondition.exists If set, enforces that the target document must or must not exist. @returns A promise that resolves with the result of the delete. If the delete fails, the promise is rejected with a BulkWriterError{@link BulkWriterError}.

Implementation

external JSPromise<WriteResult> delete(
  DocumentReference documentRef, [
  Precondition precondition,
]);