{"size": 1665, "ext": "js", "max_stars_repo_path": "decls/index.js", "max_stars_repo_name": "monrus/revalidate", "max_stars_repo_stars_event_min_datetime": "2016-03-05T00:10:26.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-06T13:36:30.000Z", "max_issues_repo_path": "decls/index.js", "max_issues_repo_name": "monrus/revalidate", "max_issues_repo_issues_event_min_datetime": "2016-05-12T01:29:01.000Z", "max_issues_repo_issues_event_max_datetime": "2021-04-09T05:12:19.000Z", "max_forks_repo_path": "decls/index.js", "max_forks_repo_name": "monrus/revalidate", "max_forks_repo_forks_event_min_datetime": "2016-05-11T02:36:24.000Z", "max_forks_repo_forks_event_max_datetime": "2020-09-25T07:57:59.000Z"}
{"max_stars_count": 386, "max_issues_count": 51, "max_forks_count": 23, "avg_line_length": 30.8333333333, "max_line_length": 109, "alphanum_fraction": 0.7423423423}
// @flow
/* eslint-disable */

declare type CombineValidatorsOptions = {
  serializeValues?: (values: any) => Object,
  nullWhenValid?: boolean,
};

declare type Config = {
  field?: any,
  message?: string,
};

declare type ComposeConfig = Config & {
  multiple?: boolean,
};

declare type ParsedField = {
  isArray: boolean,
  baseName: string,
  fullName: string,
};

declare type ValidatorFactoryConfig = {
  definition: ValidatorImpl,
  messageCreator?: MessageCreator,
  numArgs?: number,
};

declare type MessageCreator = string | (field: any, ...args: Array<any>) => any;
declare type ValidatorImpl = (message: any, ...args: Array<any>) => (value: any, allValues?: ?Object) => any;
declare type Comparer = (a: any, b: any) => boolean;

declare type ConfiguredValidator = (value?: any, allValues?: ?Object) => any;
declare type UnconfiguredValidator = (config?: string | Config, value?: any, allValues?: Object) => any;
declare type ConfiguredCombinedValidator = (value?: any, allValues?: any) => any;

declare type CurryableValidator = (config?: string | Config) => ConfiguredValidator;
declare type ComposedCurryableValidator = (config?: string | ComposeConfig) => ConfiguredValidator;

declare type ConfigurableValidator = UnconfiguredValidator & CurryableValidator;
declare type ValidatorFactory = (...args: Array<any>) => ConfigurableValidator;

declare function createValidatorFactory(
  curriedDefinition: ValidatorImpl,
  defaultMessageCreator?: MessageCreator,
): ValidatorFactory;

declare function createValidatorFactory(config: ValidatorFactoryConfig): ValidatorFactory;

declare type Validator
  = ConfiguredValidator
  & UnconfiguredValidator;
