utils.d.ts 688 B

123456789101112
  1. import { Request } from './base';
  2. import { ContextRunningOptions, ResultWithContext, ValidationChainLike } from './chain';
  3. export declare const bindAll: <T>(object: T) => { [K in keyof T]: T[K]; };
  4. export declare function toString(value: any): string;
  5. /**
  6. * Runs all validation chains, and returns their results.
  7. *
  8. * If one of them has a request-level bail set, the previous chains will be awaited on so that
  9. * results are not skewed, which can be slow.
  10. * If this same chain also contains errors, no further chains are run.
  11. */
  12. export declare function runAllChains(req: Request, chains: readonly ValidationChainLike[], runOpts?: ContextRunningOptions): Promise<ResultWithContext[]>;