UNPKG

@zerooneit/expressive-tea

Version:
15 lines (14 loc) 593 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addAnnotation = void 0; const MetaData_1 = require("../classes/MetaData"); const constants_1 = require("../libs/constants"); function addAnnotation(type, target, propertyKey, ...args) { const annotations = MetaData_1.default.get(constants_1.ROUTER_ANNOTATIONS_KEY, target, propertyKey) || []; annotations.unshift({ arguments: args, type }); MetaData_1.default.set(constants_1.ROUTER_ANNOTATIONS_KEY, annotations, target, propertyKey); } exports.addAnnotation = addAnnotation;