import { ClassDeclaration } from 'ts-morph'; export declare class InstanceService { static createInstance(className: string): any; static newInstance(data: any, className: string, classDeclaration: ClassDeclaration): T; private static map; private static deepMap; /** * Returns the path of the import of a property with its apparent type * @param apparentType * @private */ private static getApparentTypeImportDeclarationPath; private static mapPrimitive; /** * For a given object with U type (the target model), returns the source object mapped with the U model * If source === null, it returns null * CAUTION: param "target" can't be undefined */ /** * Check if two objects are both string or number. * In this case, returns true. */ private static areStringOrNumber; /** * If source and target are both string or number, we cast source into the target's type and returns it. * This methodName adds a tolerance for http requests which returns numbers instead of strings and inversely * Caution : params target and source should not be falsy values */ private static castStringAndNumbers; /** * For non-primitive objects, returns source object mapped with the type of the target (U) * If source === null, it returns null * CAUTION: param "target" can't be undefined */ private static mapNotPrimitive; }