interface ErrorControlType { hasError: boolean; errorMessage?: string; correctValue?: T; } interface ErrorControl { isValidValue(value: T): ErrorControlType; }