@darkobits/valida
Version:
Type-aware object validator.
7 lines (6 loc) • 308 B
TypeScript
import type { SpecFn, DefaultsFor, Validator } from "../etc/types";
/**
* Accepts a function that should return a spec object. The function will be
* passed an object containing a reference to `ow`.
*/
export declare function createValidator<T, D = DefaultsFor<T>>(specFn: SpecFn<T, D>): Validator<T, D>;