UNPKG

react-formal

Version:

Classy HTML form management for React

21 lines (20 loc) 1.34 kB
/// <reference types="lodash" /> import { Errors } from './types'; export declare const EMPTY_ERRORS: Errors; export declare let isChildPath: (basePath: string, path: string) => boolean; export declare function prefix(errors: Errors, baseName: string): Errors; export declare function unprefix(errors: Errors, baseName: string): Errors; export declare function pickErrors(errors: Errors, names: string[]): Errors; export declare function filter(errors: Errors, baseName: string): Errors; export interface FilterAndMapErrorsOptions { errors?: Errors; names: string | string[]; mapErrors?: (errors: Errors, names: string[]) => Errors; } export declare function filterAndMapErrors({ errors, names, mapErrors, }: FilterAndMapErrorsOptions): Errors; export declare function remove(errors: Errors, ...basePaths: string[]): import("lodash").Dictionary<any>; export declare function shift(errors: Errors, baseName: string, atIndex?: number): Errors; export declare function unshift(errors: Errors, baseName: string, atIndex?: number): Errors; export declare function move(errors: Errors, baseName: string, fromIndex: number, toIndex: number): Errors; export declare function swap(errors: Errors, baseName: string, indexA: number, indexB: number): Errors; export declare function inclusiveMapErrors(errors: Errors, names: string[]): Errors;