{"ast":null,"code":"import { ClassTransformer } from '../ClassTransformer';\n/**\n * Return the class instance only with the exposed properties.\n *\n * Can be applied to functions and getters/setters only.\n */\nexport function TransformInstanceToInstance(params) {\n  return function (target, propertyKey, descriptor) {\n    const classTransformer = new ClassTransformer();\n    const originalMethod = descriptor.value;\n    descriptor.value = function (...args) {\n      const result = originalMethod.apply(this, args);\n      const isPromise = !!result && (typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function';\n      return isPromise ? result.then(data => classTransformer.instanceToInstance(data, params)) : classTransformer.instanceToInstance(result, params);\n    };\n  };\n}\n//# sourceMappingURL=transform-instance-to-instance.decorator.js.map","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}