@@ -239,6 +239,42 @@ export function startAfter<AppModelType, DbModelType extends DocumentData>(
239
239
*/
240
240
export function limit ( limit : number ) : QueryLimitConstraint ;
241
241
242
+ /**
243
+ * Reads the document referred to by this `DocumentReference`.
244
+ *
245
+ * Note: `getDoc()` attempts to provide up-to-date data when possible by waiting
246
+ * for data from the server, but it may return cached data or fail if you are
247
+ * offline and the server cannot be reached. To specify this behavior, invoke
248
+ * {@link getDocFromCache} or {@link getDocFromServer}.
249
+ *
250
+ * @param reference - The reference of the document to fetch.
251
+ * @returns A Promise resolved with a `DocumentSnapshot` containing the
252
+ * current document contents.
253
+ */
254
+ export declare function getDoc < T > ( reference : DocumentReference < T > ) : Promise < DocumentSnapshot < T > > ;
255
+
256
+ /**
257
+ * Reads the document referred to by this `DocumentReference` from cache.
258
+ * Returns an error if the document is not currently cached.
259
+ *
260
+ * @returns A `Promise` resolved with a `DocumentSnapshot` containing the
261
+ * current document contents.
262
+ */
263
+ export declare function getDocFromCache < T > (
264
+ reference : DocumentReference < T > ,
265
+ ) : Promise < DocumentSnapshot < T > > ;
266
+
267
+ /**
268
+ * Reads the document referred to by this `DocumentReference` from the server.
269
+ * Returns an error if the network is not available.
270
+ *
271
+ * @returns A `Promise` resolved with a `DocumentSnapshot` containing the
272
+ * current document contents.
273
+ */
274
+ export declare function getDocFromServer < T > (
275
+ reference : DocumentReference < T > ,
276
+ ) : Promise < DocumentSnapshot < T > > ;
277
+
242
278
/**
243
279
* Executes the query and returns the results as a `QuerySnapshot`.
244
280
*
0 commit comments