ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
4.04k stars 1.29k forks source link

🐛[BUG] #8329

Closed 1353823765 closed 3 weeks ago

1353823765 commented 3 weeks ago

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🐛 bug 描述

本地开发问题,打包编译出错显示useControlModel这个方法的类型声明问题,打包显示 微信截图_20240419205110 [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): {

📷 复现步骤

🏞 期望结果

💻 复现代码

© 版本信息

🚑 其他信息

github-actions[bot] commented 3 weeks ago

当前 Issue 未检测到标题,请规范填写,谢谢!

The title of the current issue is not detected, please fill in according to the specifications, thank you!