import { type FirestoreDocumentDataAccessor } from '../../common/firestore/accessor/accessor'; import { type WithFieldValue, type WriteResult } from '../../common/firestore/types'; /** * Returns a function that creates a document only if it does not already exist. * * Used by client-side accessor implementations (default, transaction) as their `create()` method. * Checks for document existence first, then calls `set()` if the document is absent. * * @param accessor - the accessor to perform the existence check and set operation on * @returns a function that creates the document if it does not exist, or throws if it does * @throws {Error} When the document already exists at the reference path * * @example * ```ts * const create = createWithAccessor(accessor); * await create({ name: 'New Item' }); // throws if document already exists * ``` */ export declare function createWithAccessor(accessor: FirestoreDocumentDataAccessor): (data: WithFieldValue) => Promise;