ant-design / ant-design/pro-components

🐛[BUG]一堆文件类型引用丢失

Open
#9,053 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

提问前先看看:

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

### 🐛 bug 描述

最新版本的引用类型文件以'src/'开头,丢失引用,
下面是2.8.0版本正确的引用
```ts
declare namespace ProForm {
var Group: React.FC;
var useForm: typeof import("antd/es/form/Form").useForm;
var Item: React.FC;
var useWatch: typeof import("rc-field-form/es/useWatch").default;
var ErrorList: React.FC;
var Provider: React.FC;
var useFormInstance: typeof import("antd/es/form/hooks/useFormInstance").default;
var EditOrReadOnlyContext: React.Context<{
mode: "read" | "edit" | "update";
}>;
// ...
}
```

### 📷 复现步骤

### 🏞 期望结果

能够正确引用类型文件

### 💻 复现代码

### © 版本信息

- ProComponents 版本: [e.g. 4.0.0]
- umi 版本
- 浏览器环境
- 开发环境 [e.g. mac OS]

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start by locating the current TypeScript declarations for the ProForm namespace and compare their import paths with the working 2.8.0 examples in the issue. Check why references beginning with “src/” are emitted, then verify that the affected type files resolve correctly after the change.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.