UNPKG

routing-controllers

Version:

Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage for Express / Koa using TypeScript.

24 lines 720 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Param = void 0; const index_1 = require("../index"); /** * Injects a request's route parameter value to the controller action parameter. * Must be applied on a controller action parameter. */ function Param(name) { return function (object, methodName, index) { (0, index_1.getMetadataArgsStorage)().params.push({ type: 'param', object: object, method: methodName, index: index, name: name, parse: false, required: true, classTransform: undefined, }); }; } exports.Param = Param; //# sourceMappingURL=Param.js.map