Properties

createTime

nullable string

The date the document was created, formatted as a UTC string.

exists

boolean

Returns true if this DocumentSnapshot contains any data.

id

string

Extracts a document ID from a DocumentSnapshot.

readTime

nullable string

The last time the document was read, formatted as a UTC string.

ref

non-null firestore.DocumentReference

Returns a DocumentReference to the database location where the triggering write occurred. This DocumentReference has admin privileges.

updateTime

nullable string

The last update time for the document, formatted as a UTC string.

Methods

data

data() returns any type

Returns the data fields in their state after the triggering write event has occurred.

Returns

any type 

get

get(Key) returns any type

Gets the value for a given key.

Parameter

Key

string

The parameter supplied for this method must be the key of the data to retrieve.

Returns

any type The data value for the given key.