@type-r/models
Version:
The serializable type system for JS and TypeScript
16 lines (15 loc) • 477 B
TypeScript
export interface ChildrenErrors {
[key: string]: ValidationError | any;
}
export interface Validatable {
validate(self: any): any;
get(key: string): any;
}
export declare class ValidationError {
nested: ChildrenErrors;
length: number;
error: any;
constructor(obj: Validatable);
each(iteratee: (value: any, key: string) => void): void;
eachError(iteratee: (error: any, key: string, object: Validatable) => void, object: Validatable): void;
}