import { type FirestoreModelData, type SnapshotConverterConfig, type SnapshotConverterFunctions } from './snapshot.type'; /** * Creates converter functions for transforming between Firestore document snapshots and application model objects. * * This is the primary entry point for defining how your application models map to/from Firestore documents. * The returned object implements Firebase's {@link FirestoreDataConverter} interface and can be passed directly * to `withConverter()` on collection/document references. * * This function generates a set of utility functions that handle the conversion between your application's * typed model objects and the data format stored in Firestore. It supports field-level conversions, * custom modifiers, and handles Firestore's merge options appropriately. * * @param config - Field mappings and modifiers that drive the conversion. * @returns Function set used to convert snapshots and writes for the model. * * @template T - The application model type that will be used in your application code * @template O - The data type that will be stored in Firestore (defaults to FirestoreModelData) * * @example * ```ts * // Create a converter for a User model * const userConverter = snapshotConverterFunctions({ * fields: { * createdAt: { * from: (date: string) => new Date(date), * to: (date: Date) => date.toISOString() * } * } * }); * // Use with a collection reference * const usersCollection = firestore.collection('users').withConverter(userConverter); * ``` * * @__NO_SIDE_EFFECTS__ */ export declare function snapshotConverterFunctions>(config: SnapshotConverterConfig): SnapshotConverterFunctions;