-
-
Notifications
You must be signed in to change notification settings - Fork 53.5k
Closed
Labels
help wantedThe suggestion or request has been accepted, we need you to help us by sending a pull request.The suggestion or request has been accepted, we need you to help us by sending a pull request.
Description
Reproduction link
这个是代码链接,把typeof去掉,build即会报错
Steps to reproduce
- 项目开启ts
- 使用支持编辑的Tabs,以及onEdit方法
- onEdit方法中的两个参数(currentKey, action) 中的currentKey的类型推断会存在string和Event两种,其实只需要string一种
- build报错
- 除非增加cuurentKey的类型判断再使用
What is expected?
currentKey可能为Event的数据格式吗?如果不是的话,类型推断是否可以只给成key对应的类型;
What is actually happening?
currentKey的类型推断会存在string和Event两种
Environment | Info |
---|---|
antd | undefined |
React | ^16.8.X |
System | macOS 10.15.7 |
Browser | chrome 100.X |
Metadata
Metadata
Assignees
Labels
help wantedThe suggestion or request has been accepted, we need you to help us by sending a pull request.The suggestion or request has been accepted, we need you to help us by sending a pull request.