UNPKG

@httpc/kit

Version:

httpc toolbox for building function-based API with minimal code and end-to-end type safety

14 lines (13 loc) 429 B
export interface IValidator { canValidate(object: any, schema: any, options?: any): boolean; validate(object: any, schema: any, options?: any): ValidationResult; } export type ValidationResult = ValidationResultSuccess | ValidationResultFailed; export type ValidationResultSuccess = { success: true; object: any; }; export type ValidationResultFailed = { success: false; errors: string[]; };