feat: export ActiveDotProps and DotItemDotProps from main entry#6657
feat: export ActiveDotProps and DotItemDotProps from main entry#6657ckifer merged 1 commit intorecharts:mainfrom
Conversation
Allows importing types directly from 'recharts' instead of 'recharts/types/util/types' for better DX.
WalkthroughThe pull request adds a new type export Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (3)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6657 +/- ##
=======================================
Coverage 94.26% 94.26%
=======================================
Files 496 496
Lines 42442 42442
Branches 4859 4859
=======================================
Hits 40009 40009
Misses 2428 2428
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Allows importing types directly from 'recharts' instead of 'recharts/types/util/types' for better DX.
Description
Export
ActiveDotPropsandDotItemDotPropsfrom the mainrechartsentry (src/index.ts), so they are available from the package root.Update the
CustomizedDotLineChartwebsite example to use the new top-levelDotItemDotPropsexport instead of the deeprecharts/types/util/typespath.Related Issue
No open issue; this is a small DX-focused improvement.
Happy to link or open an issue if required.
Motivation and Context
Consumers currently need to rely on a deep import (
recharts/types/util/types) to getActiveDotPropsandDotItemDotProps, which is brittle and not clearly part of the public API.Exporting these types from the main
rechartsentry aligns them with other public types and makes type discovery and imports simpler and more ergonomic.How Has This Been Tested?
npm run lintnpm run test -- test/cartesian/Line.spec.tsxnpm run test -- test/cartesian/Area.spec.tsxnpm run check-types-websiteScreenshots (if appropriate):
N/A
Types of changes
Checklist:
Summary by CodeRabbit
New Features
Refactor