UNPKG

firelordjs

Version:

🔥 High Precision Typescript Wrapper for Firestore Web, Providing Unparalleled Type Safe and Dev Experience

30 lines (29 loc) • 1.24 kB
import { getDocs as getDocs_, getDocsFromCache as getDocsFromCache_, getDocsFromServer as getDocsFromServer_, } from 'firebase/firestore'; /** * Executes the query and returns the results as a `QuerySnapshot`. * * Note: `getDocs()` attempts to provide up-to-date data when possible by * waiting for data from the server, but it may return cached data or fail if * you are offline and the server cannot be reached. To specify this behavior, * invoke {@link getDocsFromCache} or {@link getDocsFromServer}. * * @returns A `Promise` that will be resolved with the results of the query. */ // @ts-expect-error export var getDocs = getDocs_; /** * Executes the query and returns the results as a `QuerySnapshot` from cache. * Returns an error if the document is not currently cached. * * @returns A `Promise` that will be resolved with the results of the query. */ // @ts-expect-error export var getDocsFromCache = getDocsFromCache_; /** * Executes the query and returns the results as a `QuerySnapshot` from the * server. Returns an error if the network is not available. * * @returns A `Promise` that will be resolved with the results of the query. */ // @ts-expect-error export var getDocsFromServer = getDocsFromServer_;