Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: PaginationProps ts error #32881

Closed

Conversation

cwjTerrace
Copy link
Contributor

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#32878

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English fix Pagination ts error
🇨🇳 Chinese 修复Pagination编译时ts报错

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link
Contributor

github-actions bot commented Nov 16, 2021

Prepare preview

@codecov
Copy link

codecov bot commented Nov 16, 2021

Codecov Report

Merging #32881 (55fe174) into master (870b72a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master    #32881   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          414       414           
  Lines         7675      7675           
  Branches      2217      2217           
=========================================
  Hits          7675      7675           
Impacted Files Coverage Δ
components/pagination/Pagination.tsx 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 870b72a...55fe174. Read the comment docs.

Copy link

@jtheberge jtheberge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for the quick address!

@cwjTerrace
Copy link
Contributor Author

@zombieJ 这个能看下吗 函数重载的问题 现在我father-build编译tsc校验通不过了

@afc163
Copy link
Member

afc163 commented Nov 17, 2021

给个重现。

@cwjTerrace
Copy link
Contributor Author

image
image
itemRender类型定义了2遍 这个问题已经很明显了

@cwjTerrace
Copy link
Contributor Author

一个type是string 一个 type 是 type: 'page' | 'prev' | 'next' | 'jump-prev' | 'jump-next'

@afc163
Copy link
Member

afc163 commented Nov 17, 2021

给重现的好处是:

  1. 方便写测试用例,避免下次又被我们改挂了
  2. 明确场景和根源,也许有更好的修复方式

@cwjTerrace
Copy link
Contributor Author

https://github.com/cwjTerrace/antd-4.17.0
执行npm run build报错
image

@JounQin
Copy link
Contributor

JounQin commented Nov 18, 2021

是否应该改 rc-pagination 的类型定义然后把 antd 里的 itemRender 移除?

@afc163
Copy link
Member

afc163 commented Nov 18, 2021

@JounQin 这样更好 👍

@JounQin
Copy link
Contributor

JounQin commented Nov 18, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants