export type Result<V = null, E = Error> =
  | {
      ok: true;
      error?: V;
    }
  | {
      ok: false;
      error: E;
    };
export interface ValidationRule<W, V = null, E = Error> {
  validate(what: W): Promise<Result<V, E>> | Result<V, E>;
}
export declare class CompositeValidator<W> implements ValidationRule<W> {
  private readonly validators;
  constructor(...validators: ValidationRule<W>[]);
  validate(what: W): Promise<Result>;
}
export declare class YargsChecker<W> {
  private readonly validator;
  constructor(validator: ValidationRule<W>);
  check(what: W): Promise<string | true>;
}
//# sourceMappingURL=lib.d.ts.map
