ant-design / ant-design/pro-components
🐛[BUG] ProForm type definitions broken after 2.8.3 due to absolute path imports
- Dominant language
- TypeScript
- Stars
- 4.8k
- Forks
- 1.4k
- Avg merge
- 10h 44m
- Merged PRs (30d)
- 3
Description
### 🐛 Bug 描述
在 @ant-design/pro-components 2.8.3 之后的版本中,ProForm 的类型定义出现问题。这是由于类型导入路径从相对路径改为了绝对路径(使用 src/),导致类型无法被正确解析。
### 📷 复现步骤
1. 使用 @ant-design/pro-components > 2.8.3 版本
2. 在代码中使用 ProForm.Item 或 ProForm.Group
3. TypeScript 会报错,无法找到相关类型定义
`路径:@ant-design/pro-form/es/layouts/ProForm/index.d.ts`
```tsx
// ✅ 2.8.3 之前
var Group: React.FC;
var Item: React.FC;
```
```tsx
// 🔴 2.8.3 之后
var Group: React.FC;
var Item: React.FC;
```
`"typescript": "^5.7.3"`
### 🏞 期望结果
### 💻 复现代码
### © 版本信息
- ProComponents 版本: > 2.8.3
- Umi 版本 4.4.5
- TypeScript: 5.7.3
### 🚑 其他信息
https://github.com/ant-design/pro-components/pull/8965
Contributor guide
Research direction
Inspect @ant-design/pro-form/es/layouts/ProForm/index.d.ts and compare the declaration imports before and after version 2.8.3. Review PR 8965 for related context, then verify that ProForm.Item and ProForm.Group resolve correctly with TypeScript 5.7.3; done means the generated declarations no longer reference unresolvable src/ paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100