fix: sankey types - add expliciy return type for renderTooltip#3581
Merged
Conversation
renovate Bot
referenced
this pull request
in UI5/webcomponents-react
May 11, 2023
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [recharts](https://togithub.com/recharts/recharts) | [`2.5.0` -> `2.6.2`](https://renovatebot.com/diffs/npm/recharts/2.5.0/2.6.2) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>recharts/recharts</summary> ### [`v2.6.2`](https://togithub.com/recharts/recharts/releases/tag/v2.6.2) [Compare Source](https://togithub.com/recharts/recharts/compare/v2.6.1...v2.6.2) fix bug where ts types error and cannot be generated when exporting in a consuming package. Fixes [https://github.com/recharts/recharts/pull/3581](https://togithub.com/recharts/recharts/pull/3581) #### What's Changed - fix: sankey types - add explicitly return type for renderTooltip by [@​ckifer](https://togithub.com/ckifer) in [https://github.com/recharts/recharts/pull/3581](https://togithub.com/recharts/recharts/pull/3581) **Full Changelog**: recharts/recharts@v2.6.1...v2.6.2 ### [`v2.6.1`](https://togithub.com/recharts/recharts/releases/tag/v2.6.1) [Compare Source](https://togithub.com/recharts/recharts/compare/v2.6.0...v2.6.1) #### What's Changed Quick fix for a bug crashing treemaps with tooltips in 2.6.0 - Fix treemap tooltip crash by [@​ckifer](https://togithub.com/ckifer) in [https://github.com/recharts/recharts/pull/3579](https://togithub.com/recharts/recharts/pull/3579) **Full Changelog**: recharts/recharts@v2.6.0...v2.6.1 ### [`v2.6.0`](https://togithub.com/recharts/recharts/releases/tag/v2.6.0) [Compare Source](https://togithub.com/recharts/recharts/compare/v2.5.0...v2.6.0) #### What's Changed Storybook documentation updates as well as our first accessibility feature thanks to [@​julianna-langston](https://togithub.com/julianna-langston) and some refactoring to function components! ##### Feat - \[a11y] Keyboard navigation support for categorical charts by [@​julianna-langston](https://togithub.com/julianna-langston) in [https://github.com/recharts/recharts/pull/3546](https://togithub.com/recharts/recharts/pull/3546) - See docs [here](https://release--63da8268a0da9970db6992aa.chromatic.com/?path=/docs/api-accessibility--docs) ##### Fix - Update type for `equidistantPreserveStart` axis interval by [@​frontier159](https://togithub.com/frontier159) in [https://github.com/recharts/recharts/pull/3511](https://togithub.com/recharts/recharts/pull/3511) - Stop focusing on tooltip when displayed - use event listeners instead by [@​ArkaFred](https://togithub.com/ArkaFred) in [https://github.com/recharts/recharts/pull/3515](https://togithub.com/recharts/recharts/pull/3515) ##### Docs - lots of storybook changes - [go check it out](https://release--63da8268a0da9970db6992aa.chromatic.com/)! - Getting close to parity with existing docs on recharts.org - Added accessibility add-on - Added accessibility docs to go with the keyboard navigation support - Storybook 7 stable - Much more! ##### Refactor - refactor: `Curve` to function component by [@​akamfoad](https://togithub.com/akamfoad) in [https://github.com/recharts/recharts/pull/3477](https://togithub.com/recharts/recharts/pull/3477) - refactor: `PolarGrid` to function component by [@​akamfoad](https://togithub.com/akamfoad) in [https://github.com/recharts/recharts/pull/3471](https://togithub.com/recharts/recharts/pull/3471) - refactor: `Cross` to component function by [@​akamfoad](https://togithub.com/akamfoad) in [https://github.com/recharts/recharts/pull/3475](https://togithub.com/recharts/recharts/pull/3475) - refactor: tooltip to function component by [@​ckifer](https://togithub.com/ckifer) in [https://github.com/recharts/recharts/pull/3336](https://togithub.com/recharts/recharts/pull/3336) - fix: defaultProps of tooltip, fix viewBox by [@​ckifer](https://togithub.com/ckifer) in [https://github.com/recharts/recharts/pull/3554](https://togithub.com/recharts/recharts/pull/3554) - refactor: `Text` to function component by [@​akamfoad](https://togithub.com/akamfoad) in [https://github.com/recharts/recharts/pull/3463](https://togithub.com/recharts/recharts/pull/3463) #### New Contributors - [@​akamfoad](https://togithub.com/akamfoad) made their first contribution in [https://github.com/recharts/recharts/pull/3466](https://togithub.com/recharts/recharts/pull/3466) - [@​nicholasgcoles](https://togithub.com/nicholasgcoles) made their first contribution in [https://github.com/recharts/recharts/pull/3467](https://togithub.com/recharts/recharts/pull/3467) - [@​linhuiw](https://togithub.com/linhuiw) made their first contribution in [https://github.com/recharts/recharts/pull/3508](https://togithub.com/recharts/recharts/pull/3508) - [@​frontier159](https://togithub.com/frontier159) made their first contribution in [https://github.com/recharts/recharts/pull/3511](https://togithub.com/recharts/recharts/pull/3511) - [@​ArkaFred](https://togithub.com/ArkaFred) made their first contribution in [https://github.com/recharts/recharts/pull/3515](https://togithub.com/recharts/recharts/pull/3515) - [@​julianna-langston](https://togithub.com/julianna-langston) made their first contribution in [https://github.com/recharts/recharts/pull/3540](https://togithub.com/recharts/recharts/pull/3540) **Full Changelog**: recharts/recharts@v2.5.0...v2.6.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/SAP/ui5-webcomponents-react). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS43NC4wIiwidXBkYXRlZEluVmVyIjoiMzUuNzUuMCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Lukas Harbarth <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
#3580
Broken types after refactoring Tooltip to a function component because
renderTooltipof Sankey didn't explicitly set a return type. This confirms the flakiness of recharts types and the use ofReact.cloneElement.Before any more refactoring changes try to build into a project and compile it with
tscRelated Issue
#3580
Motivation and Context
How Has This Been Tested?
Sankey.d.tsin recharts build aftertsc-> see error in outputrenderTooltiprenderTooltipfunctions (they all useReact.ReactElement)React.ReactElementScreenshots (if appropriate):
Types of changes
Checklist: