export type ValueState = T | undefined | null; export interface ValidatorError { id: string; message: string; data?: T; } export type ValidatorResult = ValidatorError | undefined; export type ValidatorFn = (value?: ValueState) => ValidatorResult;