UNPKG

tachijs

Version:

Highly testable dead simple web server written in Typescript

29 lines 867 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const injectMetaMap = new Map(); function getInjectMetaList(controller) { const metaList = injectMetaMap.get(controller); if (metaList == null) return []; return metaList; } exports.getInjectMetaList = getInjectMetaList; function setInjectMetaList(controller, meta) { injectMetaMap.set(controller, meta); } exports.setInjectMetaList = setInjectMetaList; function inject(key) { return function controllerDecorator(target, propertyKey, index) { const previousInjectMetaList = getInjectMetaList(target); const meta = [ { index, key }, ...previousInjectMetaList ]; setInjectMetaList(target, meta); }; } exports.inject = inject; //# sourceMappingURL=inject.js.map