UNPKG

node-web-mvc

Version:
26 lines (25 loc) 835 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); /** * @module PathVariable * @description 提取path中请求参数值 */ const Target_1 = __importDefault(require("../Target")); const ParamAnnotation_1 = __importDefault(require("./ParamAnnotation")); const ElementType_1 = __importDefault(require("../annotation/ElementType")); class PathVariable extends ParamAnnotation_1.default { constructor() { super('path'); } } /** * 从请求path中提取指定名称的参数值 * * action(@PathVariable id) * * action(@PathVariable({ required: true }) id) */ exports.default = (0, Target_1.default)(ElementType_1.default.PARAMETER)(PathVariable);