create method

JSPromise<WriteResult> create(
  1. JSObject data
)

Creates a document referred to by this DocumentReference with the provided object values. The write fails if the document already exists

@param data The object data to serialize as the document. @throws {Error} If the provided input is not a valid Firestore document or if the document already exists. @return A Promise resolved with the write time of this create.

Implementation

external JSPromise<WriteResult> create(JSObject data);