@mikro-orm/core
Version:
TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.
11 lines (10 loc) • 673 B
TypeScript
import type { EntityDTO, EntityKey } from '../typings.js';
/** Converts entity instances to plain objects via `toObject()`, respecting populate hints, hidden fields, and serialization context. */
export declare class EntityTransformer {
/** Converts an entity to a plain object, respecting populate hints, hidden fields, and custom serializers. */
static toObject<Entity extends object, Ignored extends EntityKey<Entity> = never>(entity: Entity, ignoreFields?: Ignored[], raw?: boolean): Omit<EntityDTO<Entity>, Ignored>;
private static propertyName;
private static processProperty;
private static processEntity;
private static processCollection;
}