export declare function useControlModel({ value, onChange, id }: WithControlPropsType, model?: T): ControlModelType;
export declare function useControlModel<const T extends readonly string[]> ({ value, onChange, id }: WithControlPropsType, model ?: T): {
};
export declare function useControlModel<const T extends readonly FormControlMultiProps[]> ({ value, onChange, id }: WithControlPropsType, model ?: T): {
};
/
🐛 bug 描述
2.7最新的版本本地没问题打包会提示ts编译错误,显示
/./node_modules/.pnpm/@ant-design+pro-form@2.26.0_antd@5.16.2_rc-field-form@1.44.0_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/pro-form/es/components/FormItemRender/index.d.ts:24:41
[17:53:27] Type error: Type parameter declaration expected.
[17:53:27]
[17:53:27] 22 | }[]> = T[number]['name'];
[17:53:27] 23 | export declare function useControlModel({ value, onChange, id }: WithControlPropsType, model?: T): ControlModelType;
[17:53:27] > 24 | export declare function useControlModel<const T extends readonly string[]>({ value, onChange, id }: WithControlPropsType, model?: T): {
[17:53:27] | ^
[17:53:27] 26 | };
[17:53:27] 27 | export declare function useControlModel<const T extends readonly FormControlMultiProps[]>({ value, onChange, id }: WithControlPropsType, model?: T): {
export declare function useControlModel({ value, onChange, id }: WithControlPropsType, model?: T): ControlModelType;
export declare function useControlModel<const T extends readonly string[]> ({ value, onChange, id }: WithControlPropsType, model ?: T): {
}; export declare function useControlModel<const T extends readonly FormControlMultiProps[]> ({ value, onChange, id }: WithControlPropsType, model ?: T): {
}; /
🐛 bug 描述
2.7最新的版本本地没问题打包会提示ts编译错误,显示 /./node_modules/.pnpm/@ant-design+pro-form@2.26.0_antd@5.16.2_rc-field-form@1.44.0_react-dom@18.2.0_react@18.2.0/node_modules/@ant-design/pro-form/es/components/FormItemRender/index.d.ts:24:41 [17:53:27] Type error: Type parameter declaration expected. [17:53:27] [17:53:27] 22 | }[]> = T[number]['name']; [17:53:27] 23 | export declare function useControlModel({ value, onChange, id }: WithControlPropsType, model?: T): ControlModelType;
[17:53:27] > 24 | export declare function useControlModel<const T extends readonly string[]>({ value, onChange, id }: WithControlPropsType, model?: T): {
[17:53:27] | ^
[17:53:27] 26 | }; [17:53:27] 27 | export declare function useControlModel<const T extends readonly FormControlMultiProps[]>({ value, onChange, id }: WithControlPropsType, model?: T): {
📷 复现步骤
🏞 期望结果
💻 复现代码
© 版本信息
🚑 其他信息