Home > @firebase/firestore > / > getDocFromServer
getDocFromServer() function
Reads the document referred to by this DocumentReference
from the server. Returns an error if the network is not available.
Signature:
export declare function getDocFromServer<T>(reference: DocumentReference<T>): Promise<DocumentSnapshot<T>>;
Parameters
Parameter | Type | Description |
---|---|---|
reference | DocumentReference<T> |
Returns:
Promise<DocumentSnapshot<T>>
A Promise resolved with a DocumentSnapshot
containing the current document contents.