-
Notifications
You must be signed in to change notification settings - Fork 0
/
rc-form.d.ts
32 lines (32 loc) · 906 Bytes
/
rc-form.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// rc-form没有ts版本,所以自定义类型
declare module "rc-form" {
export const createForm: Function;
export interface FormType {
getFieldsValue: Function;
getFieldValue: Function;
getFieldInstance: Function;
setFieldsValue: Function;
setFields: Function;
setFieldsInitialValue: Function;
getFieldDecorator: Function;
getFieldProps: Function;
getFieldsError: Function;
getFieldError: Function;
isFieldValidating: Function;
isFieldsValidating: Function;
isFieldsTouched: Function;
isFieldTouched: Function;
isSubmitting: Function;
submit: Function;
validateFields: Function;
resetFields: Function;
}
export type ValidateErrors = {
[fieldName: string]: {
errors: Array<{ message: string; field: string;[s: string]: any }>
}
} | null;
export type ValidateValues = {
[fieldName: string]: any
};
}