diff --git a/packages/core-react/src/index.tsx b/packages/core-react/src/index.tsx index f078872..7798bf5 100644 --- a/packages/core-react/src/index.tsx +++ b/packages/core-react/src/index.tsx @@ -16,6 +16,7 @@ export type { IMaybePromise, IObjectAny, IOptional, + IPartPartial, IPartRequired, IPath, IWriteable, diff --git a/packages/core-react/src/typings/common.d.ts b/packages/core-react/src/typings/common.d.ts index 3462647..20c941f 100644 --- a/packages/core-react/src/typings/common.d.ts +++ b/packages/core-react/src/typings/common.d.ts @@ -21,7 +21,13 @@ export type IPartRequired = Omit & Required = Omit & Partial> +export type IPartPartial = Omit & Partial> + +/** + * 让对象属性部分可选 + * @deprecated please use IPartPartial + */ +export type IOptional = IPartPartial /** * 让对象属性去掉只读限制 diff --git a/packages/form-render-react/src/typings/index.d.ts b/packages/form-render-react/src/typings/index.d.ts index 5a30ef1..d1517c9 100644 --- a/packages/form-render-react/src/typings/index.d.ts +++ b/packages/form-render-react/src/typings/index.d.ts @@ -6,7 +6,7 @@ import type { IMaybePromise, IObjectAny, IOpenItemLayoutParams, - IOptional, + IPartPartial, IPartRequired, IRootSchema, } from '@schema-render/core-react' @@ -71,7 +71,7 @@ export type ILabelRender = ( /** * FormRender 参数配置 */ -export type IFormRenderProps = IOptional< +export type IFormRenderProps = IPartPartial< Omit, 'renderers' > & {