Skip to content

Expose input internal types#177

Merged
afc163 merged 2 commits into
react-component:masterfrom
QDyanbing:avoid-deep-imports
May 22, 2026
Merged

Expose input internal types#177
afc163 merged 2 commits into
react-component:masterfrom
QDyanbing:avoid-deep-imports

Conversation

@QDyanbing
Copy link
Copy Markdown
Contributor

@QDyanbing QDyanbing commented May 22, 2026

背景

antd 需要移除对 @rc-component/input/lib/interface 的深路径依赖,改为从包根入口导入公开类型。

调整内容

  • 在根入口导出 BaseInputProps,覆盖 antd 当前使用场景。
  • 在根入口导出 HolderRef,覆盖下游 rc 包对 BaseInput ref 类型的复用需求。

验证

  • npm run lint 通过,仅存在项目已有 warning。

Summary by CodeRabbit

发布说明

  • 重构
    • 优化了类型导出结构,改进了代码组织方式。

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Warning

Rate limit exceeded

@QDyanbing has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 54 minutes and 4 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 783f9648-3787-4ce8-9840-52bfe44aa441

📥 Commits

Reviewing files that changed from the base of the PR and between d552c8a and 5cd6e33.

📒 Files selected for processing (1)
  • src/index.tsx

概览

src/index.tsx 中添加了 HolderRef 类型的显式重新导出,将其从 ./BaseInput 模块导入并纳入导出类型列表。

更改内容

类型导出结构更新

层 / 文件 总结
HolderRef 类型重新导出
src/index.tsx
HolderRef 类型现在从 ./BaseInput 显式导入并通过 export type { HolderRef } 语句重新导出。

相关 PR

  • react-component/input#101:本 PR 重新导出了来自 src/BaseInputHolderRef 类型,该检索到的 PR 修改了 src/BaseInput.tsx 中的类型行为,两者通过同一个 BaseInput 类型接口直接相关。

代码审查工作量评估

🎯 1 (平凡) | ⏱️ ~3 分钟

诗歌

🐰 一只兔子来,轻轻挥爪:
类型导出更新,清晰又直观,
HolderRef 从暗处走向光芒,
模块接口重构,整洁又敞亮,
小小三行代码,大大改变力量!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR标题准确反映了主要变更:将内部输入类型(HolderRef)从./BaseInput导出到包根目录,使其对外部消费者可用。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates src/index.tsx to export BaseInputProps and HolderRef. The review feedback suggests streamlining the export of HolderRef by using a direct export from the source file, which would eliminate a redundant import and maintain consistency with existing export patterns.

Comment thread src/index.tsx Outdated
Comment thread src/index.tsx Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.34%. Comparing base (f6838d2) to head (5cd6e33).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #177   +/-   ##
=======================================
  Coverage   98.34%   98.34%           
=======================================
  Files          11       11           
  Lines         423      423           
  Branches      137      137           
=======================================
  Hits          416      416           
  Misses          7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@afc163 afc163 merged commit c9a9fab into react-component:master May 22, 2026
7 checks passed
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.

2 participants