Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

[Documentation] Disambiguate DocumentRef.create documentation  #1921

@cedvdb

Description

@cedvdb

The documentation for the create method could be improved to explain exactly what "The write fails if the document already exists " means. Will the call throw an error ? If so it's not listed in throws. If it does nothing, then it should say it does nothing instead of "fails".

    /**
     * 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.
     * @return A Promise resolved with the write time of this create.
     */
    create(data: WithFieldValue<T>): Promise<WriteResult>;

Metadata

Metadata

Assignees

Labels

api: firestoreIssues related to the googleapis/nodejs-firestore API.priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions