UNPKG

@iucteam/lot-agents

Version:

Agents for lot agentic framework

16 lines 536 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Validator = void 0; const Validator = function (options) { return (_target, _propertyKey, descriptor) => { const method = descriptor.value; descriptor.value = async function (...args) { if (!options.validator(...args)) { throw new Error(options.message); } return method.apply(this, args); }; }; }; exports.Validator = Validator; //# sourceMappingURL=Validator.js.map