ant-design / ant-design/pro-components
🐛[BUG] 打包编译错误本地正常
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
export declare function useControlModel({ value, onChange, id }: WithControlPropsType, model?: T): ControlModelType;
export declare function useControlModel ({ value, onChange, id }: WithControlPropsType, model ?: T): {
[P in T[number]]: ControlModelType;
};
export declare function useControlModel ({ value, onChange, id }: WithControlPropsType, model ?: T): {
[P in GetArrayFieldType]: ControlModelType;
};
/
### 🐛 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({ value, onChange, id }: WithControlPropsType, model?: T): {
[17:53:27] | ^
[17:53:27] 25 | [P in T[number]]: ControlModelType;
[17:53:27] 26 | };
[17:53:27] 27 | export declare function useControlModel({ value, onChange, id }: WithControlPropsType, model?: T): {
### 📷 复现步骤
### 🏞 期望结果
### 💻 复现代码
### © 版本信息
- ProComponents 版本: [e.g. 4.0.0]
- umi 版本
- 浏览器环境
- 开发环境 [e.g. mac OS]
### 🚑 其他信息
Contributor guide
Research direction
Start by reproducing the reported package build with the versions shown in the error, focusing on node_modules/.pnpm/@ant-design+pro-form.../es/components/FormItemRender/index.d.ts at line 24. Compare the TypeScript/compiler and package versions used locally versus during packaging. Done means the package builds without the reported declaration parsing error, with the relevant reproduction or regression coverage documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100