UNPKG

@sekwiatkowski/js-fp

Version:

A pragmatic functional programming library for JavaScript/TypeScript

9 lines (8 loc) 325 B
import { Validated } from './Validated'; declare class Validator<T, E> { private readonly rules; constructor(rules: ((value: T) => Validated<T, E>)[]); validate(value: T): Validated<T, E>; } export declare function validator<T, E>(...rules: ((value: T) => Validated<T, E>)[]): Validator<T, E>; export {};