UNPKG

@tsed/common

Version:
22 lines 685 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ParamFn = void 0; const core_1 = require("@tsed/core"); const ParamMetadata_1 = require("../../models/ParamMetadata"); /** * Get the Param metadata. Use this decorator to compose your own decorator. * * @param fn * @decorator * @operation * @input */ function ParamFn(fn) { return (target, propertyKey, index) => { if (core_1.decoratorTypeOf([target, propertyKey, index]) === "parameter") { fn(ParamMetadata_1.ParamMetadata.get(target, propertyKey, index), [target, propertyKey, index]); } }; } exports.ParamFn = ParamFn; //# sourceMappingURL=paramFn.js.map