DocumentReference | JavaScript SDK  |  Node.js (client) API reference  |  Firebase

Type parameters

  • T

Index

Constructors

Private constructor

Properties

firestore

id

id: string

parent

path

path: string

Methods

collection

delete

  • delete ( ) : Promise < void >
  • 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).

get

isEqual

onSnapshot

set

  • set ( data Partial < T > ,  options SetOptions ) : Promise < void >
  • Parameters

    Returns Promise<void>

    A Promise resolved once the data has been successfully written to the backend (Note that it won't resolve while you're offline).

  • set ( data T ) : Promise < void >
  • Parameters

    • data: T

    Returns Promise<void>

    A Promise resolved once the data has been successfully written to the backend (Note that it won't resolve while you're offline).

update

  • update ( data UpdateData ) : Promise < void >
  • Parameters

    Returns Promise<void>

    A Promise resolved once the data has been successfully written to the backend (Note that it won't resolve while you're offline).

  • update ( field string | FieldPath ,  value any... moreFieldsAndValues any [] ) : Promise < void >
  • Parameters

    • field: string | FieldPath
    • value: any
    • Rest ...moreFieldsAndValues: any[]

    Returns Promise<void>

    A Promise resolved once the data has been successfully written to the backend (Note that it won't resolve while you're offline).

withConverter