UNPKG

nats-micro

Version:

NATS micro compatible extra-lightweight microservice library

17 lines 712 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.method = void 0; /* eslint-disable @typescript-eslint/no-explicit-any */ const storage_js_1 = require("./storage.js"); function method(options) { return (target, key, descriptor) => { if (!descriptor.value) throw new Error('Use method decorators only on class methods'); const storedMethod = storage_js_1.storage.ensureClassMethodAdded(target, descriptor.value); // storedMethod.name = methodName; storedMethod.config = Object.assign(Object.assign({}, storedMethod.config), options); return descriptor; }; } exports.method = method; //# sourceMappingURL=method.js.map