routing-controllers
Version:
Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage for Express / Koa using TypeScript.
21 lines • 613 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Ctx = Ctx;
const index_1 = require("../index");
/**
* Injects a Koa's Context object to the controller action parameter.
* Must be applied on a controller action parameter.
*/
function Ctx() {
return function (object, methodName, index) {
(0, index_1.getMetadataArgsStorage)().params.push({
type: 'context',
object: object,
method: methodName,
index: index,
parse: false,
required: false,
});
};
}
//# sourceMappingURL=Ctx.js.map
;