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]:打包之后useControlModel这个方法ts类型检查错误 #8332

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 描述

本地开发正常,打包显示ts类型错误 具体在 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): {

};

📷 复现步骤

🏞 期望结果

💻 复现代码

© 版本信息

🚑 其他信息

chenshuai2144 commented 3 weeks ago

dup of #8330

yummyLcj commented 2 weeks ago

参考 https://github.com/ant-design/pro-components/issues/8217 检查一下ts版本