voluptasmollitia
Version:
Monorepo for the Firebase JavaScript SDK
27 lines (15 loc) • 916 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@firebase/firestore](./firestore.md) > [/](./firestore_.md) > [getDocFromServer](./firestore_.getdocfromserver.md)
## getDocFromServer() function
Reads the document referred to by this `DocumentReference` from the server. Returns an error if the network is not available.
<b>Signature:</b>
```typescript
export declare function getDocFromServer<T>(reference: DocumentReference<T>): Promise<DocumentSnapshot<T>>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| reference | [DocumentReference](./firestore_.documentreference.md)<!-- --><T> | |
<b>Returns:</b>
Promise<[DocumentSnapshot](./firestore_.documentsnapshot.md)<!-- --><T>>
A Promise resolved with a `DocumentSnapshot` containing the current document contents.