/** * A simple utility class for translating data between objects and intermediary representations. * The most obvious use cases are unpacking a DTO into a class instance, or merging multiple DTOs into a complex model. * Mostly this class is a structured way of avoiding the endless repetition of "if x.hasOwnProperty( x )". */ export declare class AlMergeHelper { source: any; target: any; constructor(source: any, target: any); /** * Copies one or more properties from the source into the target. */ copy(...sourceProperties: string[]): void; /** * Copies a property from the source to a different property name in the target. */ rename(sourceProperty: string, targetProperty: string): void; /** * Copies an array of properties from source to a different property name in the target. */ renameAll(...properties: [string, string][]): void; /** * Transforms a property from the source into a new property in the target. */ transform(sourceProperty: string, targetProperty: string, transformer: { (input: unknown): any; }): void; /** * Executes a callback against a property in the source object. */ with(sourceProperty: string, action: { (value: PropertyType): void; }): void; /** * Creates a child merge helper that targets a child property. */ descend(sourceProperty: string, targetProperty: string | null, action: { (merger: AlMergeHelper): void; }): void; }