UNPKG

firesage

Version:

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

13 lines (9 loc) • 707 B
import { MetaType, CollectionReference, DocumentReference } from '../types'; /** Add a new document to specified CollectionReference with the given data, assigning it a document ID automatically. @param reference — A reference to the collection to add this document to. @param data — An Object containing the data for the new document. @returns A Promise resolved with a DocumentReference pointing to the newly created document after it has been written to the backend (Note that it won't resolve while you're offline). */ export declare const addDoc: <T extends MetaType>(reference: CollectionReference<T>, data: T["write"]) => Promise<DocumentReference<T>>;