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 - Accessor used to check for existence and write the new document. * @returns Create function that writes the document or throws when it already exists. * @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 * ``` * * @__NO_SIDE_EFFECTS__ */ export declare function createWithAccessor(accessor: FirestoreDocumentDataAccessor): (data: WithFieldValue) => Promise;