@rc-component/form
Advanced tools
@@ -180,3 +180,3 @@ import type { ReactElement } from 'react'; | ||
| /** Only return partial when type is not any */ | ||
| type RecursivePartial<T> = T extends (infer U)[] ? RecursivePartial<U>[] : T extends object ? { | ||
| export type RecursivePartial<T> = T extends Date | RegExp | Function | Map<any, any> | Set<any> ? T : T extends (infer U)[] ? RecursivePartial<U>[] : T extends readonly (infer U)[] ? readonly RecursivePartial<U>[] : T extends object ? { | ||
| [P in keyof T]?: RecursivePartial<T[P]>; | ||
@@ -205,3 +205,3 @@ } : T; | ||
| setFieldValue: (name: NamePath<Values>, value: any) => void; | ||
| setFieldsValue: (values: RecursivePartial<Values>) => void; | ||
| setFieldsValue: (values: RecursivePartial<Values> | Partial<Values>) => void; | ||
| validateFields: ValidateFields<Values>; | ||
@@ -208,0 +208,0 @@ submit: () => void; |
@@ -180,3 +180,3 @@ import type { ReactElement } from 'react'; | ||
| /** Only return partial when type is not any */ | ||
| type RecursivePartial<T> = T extends (infer U)[] ? RecursivePartial<U>[] : T extends object ? { | ||
| export type RecursivePartial<T> = T extends Date | RegExp | Function | Map<any, any> | Set<any> ? T : T extends (infer U)[] ? RecursivePartial<U>[] : T extends readonly (infer U)[] ? readonly RecursivePartial<U>[] : T extends object ? { | ||
| [P in keyof T]?: RecursivePartial<T[P]>; | ||
@@ -205,3 +205,3 @@ } : T; | ||
| setFieldValue: (name: NamePath<Values>, value: any) => void; | ||
| setFieldsValue: (values: RecursivePartial<Values>) => void; | ||
| setFieldsValue: (values: RecursivePartial<Values> | Partial<Values>) => void; | ||
| validateFields: ValidateFields<Values>; | ||
@@ -208,0 +208,0 @@ submit: () => void; |
+2
-2
| { | ||
| "name": "@rc-component/form", | ||
| "version": "1.8.3", | ||
| "version": "1.8.4", | ||
| "description": "React Form Component", | ||
@@ -63,3 +63,3 @@ "typings": "es/index.d.ts", | ||
| "@types/lodash": "^4.14.135", | ||
| "@types/node": "^22.0.2", | ||
| "@types/node": "^25.6.0", | ||
| "@types/react": "^19.0.6", | ||
@@ -66,0 +66,0 @@ "@types/react-dom": "^19.0.1", |
249781
0.13%