export type JSONSchema = { definitions?: Record; [key: string]: any; }; export type IValidationRight = { valid: true; }; export type ValidationLeft = { valid: false; errors: T; }; export type ValidationResponse = ValidationLeft | IValidationRight; export type MicroValidator = { validate: (data: T) => ValidationResponse; toJSONSchema?: () => JSONSchema; };