refactor(components): [statistic] use type-based definitions#23452
Conversation
📝 WalkthroughWalkthroughReplaces the runtime-exported prop type with an explicit exported TypeScript Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
commit: |
|
🧪 Playground Preview: https://element-plus.run/?pr=23452 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@packages/components/statistic/src/statistic.ts`:
- Around line 21-23: Change the formatter property return type in the
StatisticProps interface from void to string | number so consumers can return
displayable values; locate the formatter declaration (formatter?: (...args:
any[]) => void) in StatisticProps and update its signature to (value: number) =>
string | number (or a compatible generic signature like (...args: any[]) =>
string | number) to match the implementation in statistic.vue where the
formatter result is returned for display.
|
@snowbitx Thanks for your contribution! ❤️ |

Please make sure these boxes are checked before submitting your PR, thank you!
devbranch.ref #23399
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.