import { Class, ProjectionFor, ReadModelInterface } from '@boostercloud/framework-types'; /** * Creates an instance of the given class from the given raw object. * * @param instanceClass The class of the instance to create * @param rawObject The raw object to use as source * * @returns An instance of the given class * * @example * ```typescript * import { createInstance } from '@boostercloud/framework-common-helpers' * import { User } from './entities/user' * * const rawUser = { * id: '123', * name: 'John Doe', * } * * const user = createInstance(User, rawUser) * * console.log(user.id) // Prints '123' * console.log(user.name) // Prints 'John Doe' * ``` */ export declare function createInstance(instanceClass: Class, rawObject: Record): T; /** * Creates an array of instances of the given class from the given array of raw objects. * * @param instanceClass The class of the instances to create * @param rawObjects The array of raw objects to use as source * * @returns An array of instances of the given class * * @see {@link createInstance} */ export declare function createInstances(instanceClass: Class, rawObjects: Array>): T[]; /** * Creates an instance of the read model class with the calculated properties included * @param instanceClass The read model class * @param raw The raw read model data * @param propertiesToInclude The properties to include in the response * @private */ export declare function createInstanceWithCalculatedProperties(instanceClass: Class, raw: Partial, propertiesToInclude: ProjectionFor): Promise;