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

improve(ui): improve generated types #930

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

wzc520pyfm
Copy link
Collaborator

@wzc520pyfm wzc520pyfm commented Jan 13, 2025

📦 Modified package

  • @oceanbase/design
  • @oceanbase/ui
  • @oceanbase/icons
  • @oceanbase/charts
  • @oceanbase/util
  • @oceanbase/codemod
  • Other (about what?)

🤔 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
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

被LocalWrapper包裹的组件,在打包后类型都被推导成了any。

Before After
image image
image image

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese 1. 调整LocalWrapper类型以避免其将组件包裹为any
2. 修复ts错误

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

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

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


王志超 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

github-actions bot commented Jan 13, 2025

@wzc520pyfm wzc520pyfm marked this pull request as ready for review January 15, 2025 07:26
@wzc520pyfm wzc520pyfm changed the title wip: improve(ui): improve generated types improve(ui): improve generated types Jan 15, 2025
@wzc520pyfm
Copy link
Collaborator Author

我应该没有变更packages/ui/src/ProTable/__tests__/index.test.tsx,但是他的测试失败了,可以帮忙排查一下原因吗? @dengfuping @linhf123

@wzc520pyfm
Copy link
Collaborator Author

PR修复了LocalWrapper类型,能够正确推导出组件类型(此前一直是any),如果使用ob-desgin的项目此前组件传参不规范,升级后可能出现类型错误引发构建问题,是否应该考虑将此PR列入次要版本0.5.0? @dengfuping @linhf123

@dengfuping
Copy link
Collaborator

PR修复了LocalWrapper类型,能够正确推导出组件类型(此前一直是any),如果使用ob-desgin的项目此前组件传参不规范,升级后可能出现类型错误引发构建问题,是否应该考虑将此PR列入次要版本0.5.0? @dengfuping @linhf123

@linhf123 帮忙 Review 下吧

@wzc520pyfm
Copy link
Collaborator Author

@dengfuping @linhf123 可以帮忙更新一下lock文件吗?我本地pnpm版本不一致,更新lock文件后差异太大了。

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.

3 participants