export interface CleanFirestoreDataOptions { /** * If true, replaces undefined property values with null instead of omitting them. * Default: false (omits undefined properties). */ replaceUndefinedWithNull?: boolean; /** * If true, filters out undefined elements from arrays. * Default: true. */ filterArrayUndefined?: boolean; } /** * Recursively cleans an object or array to make it safe for Firestore writes. * * Firestore throws an runtime error when saving properties with `undefined` values. * This utility traverses plain objects and removes `undefined` properties (or optionally converts * them to `null`), while keeping Firestore types (`Timestamp`, `FieldValue`, `DocumentReference`, * `GeoPoint`, etc.) and native instances (`Date`) completely intact. * * @param data The data object or array to sanitize. * @param options Sanitization options. * @returns A clean object safe to pass to `setDoc`, `updateDoc`, or `toFirestore`. * * @example * ```typescript * const cleaned = cleanFirestoreData({ * name: 'Camp Alpha', * notes: undefined, // stripped out * timestamp: serverTimestamp(), // preserved * tags: ['tag1', undefined], // undefined filtered out * }); * ``` */ export declare function cleanFirestoreData(data: T, options?: CleanFirestoreDataOptions): T; //# sourceMappingURL=clean.d.ts.map