@iucteam/lot-agents
Version:
Agents for lot agentic framework
13 lines (12 loc) • 555 B
TypeScript
export type ValidatorFcn = (...p: any[]) => boolean;
/**
* Define the validator inputs. validator is the function that is called with the function arguments
* and should return a boolean value, true if the validation is successful false otherwise.
* In case the return value if false an Error is thrown with the provided message.
*/
interface Options {
validator: ValidatorFcn;
message: string;
}
export declare const Validator: (options: Options) => (_target: object, _propertyKey: string, descriptor: PropertyDescriptor) => void;
export {};