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. * * @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) * @param config - Configuration for the converter, including field mappings and modifiers * @returns A set of functions for converting between Firestore data and application models * * @example * // 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); */ export declare function snapshotConverterFunctions>(config: SnapshotConverterConfig): SnapshotConverterFunctions;