import { ToObjectOptions } from 'mongoose'; /** * @fileoverview * Provides a factory function to generate Mongoose `ToObjectOptions` with custom * document transformation logic and virtual fields enabled. This utility is * designed to encapsulate reusable transformation behavior across different schemas. */ /** * Creates a reusable Mongoose `ToObjectOptions` configuration that includes virtual fields * and applies a custom transformation to the document. * * This abstraction ensures consistent output formatting and enables application-wide use * of shared transformation logic when converting Mongoose documents to plain JavaScript objects. * * @template T - The original Mongoose document type. * @template R - The transformed output type. Defaults to `T` if not explicitly specified. * * @param {(document: T) => R} transformDocument - A function that receives the raw Mongoose document * and returns a transformed plain JavaScript object. * * @returns {ToObjectOptions} A `toObject` configuration object with virtuals enabled and a custom transform applied. */ export declare const createSchemaTransformer: (transformDocument: (document: T) => R) => ToObjectOptions;