const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.js');
const require_ClassTransformer$1 = require('../ClassTransformer.js');

//#region ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/transform-instance-to-instance.decorator.js
var require_transform_instance_to_instance_decorator = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/decorators/transform-instance-to-instance.decorator.js": ((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	const ClassTransformer_1 = require_ClassTransformer$1.require_ClassTransformer();
	/**
	* Return the class instance only with the exposed properties.
	*
	* Can be applied to functions and getters/setters only.
	*/
	function TransformInstanceToInstance(params) {
		return function(target, propertyKey, descriptor) {
			const classTransformer = new ClassTransformer_1.ClassTransformer();
			const originalMethod = descriptor.value;
			descriptor.value = function(...args) {
				const result = originalMethod.apply(this, args);
				return !!result && (typeof result === "object" || typeof result === "function") && typeof result.then === "function" ? result.then((data) => classTransformer.instanceToInstance(data, params)) : classTransformer.instanceToInstance(result, params);
			};
		};
	}
	exports.TransformInstanceToInstance = TransformInstanceToInstance;
}) });

//#endregion
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function () {
    return require_transform_instance_to_instance_decorator();
  }
});