UNPKG

1.25 kBTypeScriptView Raw
1import { ComponentClass, FunctionComponent, ReactElement } from "react";
2
3export type FieldType = "Field" | "FieldArray";
4
5export interface ErrorOther<T = string> {
6 _error?: T | undefined;
7}
8
9export type FormErrors<FormData = {}, T = string> =
10 & {
11 [P in keyof FormData]?: ReactElement | T;
12 }
13 & ErrorOther<T>;
14
15export interface WarningOther<T = void> {
16 _warning?: T | undefined;
17}
18
19export type FormWarnings<FormData = {}, T = void> = {
20 [P in keyof FormData]?: ReactElement | string | WarningOther<T>;
21};
22
23export interface RegisteredFieldState {
24 name: string;
25 type: FieldType;
26}
27
28export type Omit<T, K extends keyof T> = Pick<
29 T,
30 ({ [P in keyof T]: P } & { [P in K]: never } & { [x: string]: never; [x: number]: never })[keyof T]
31>;
32
33export * from "./lib/actions";
34export * from "./lib/actionTypes";
35export * from "./lib/Field";
36export * from "./lib/FieldArray";
37export * from "./lib/Fields";
38export * from "./lib/Form";
39export * from "./lib/FormName";
40export * from "./lib/FormSection";
41export * from "./lib/formValues";
42export * from "./lib/formValueSelector";
43export * from "./lib/reducer";
44export * from "./lib/reduxForm";
45export * from "./lib/selectors";
46export * from "./lib/SubmissionError";