Add explicit children types#181257
Conversation
|
/ci |
|
/ci |
|
Thank you for the feedback @jgowdyelastic @cnasikas @nikitaindik , I have aligned all the changes to use |
...cation/data_frame_analytics/pages/analytics_creation/components/details_step/description.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/public/application/components/page_header/page_header.tsx
Outdated
Show resolved
Hide resolved
…s/analytics_creation/components/details_step/description.tsx Co-authored-by: James Gowdy <jgowdy@elastic.co>
…bana into chore/react-18-props # Conflicts: # x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/details_step/description.tsx
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Any counts in public APIs
Async chunks
Canvas Sharable Runtime
Page load bundle
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
There are still quite a lot of places in the ML code where PropsWithChildren can be used rather than children?: React.ReactNode.
But to not hold up this PR I'll approve and I'll fix them in a follow up.
…ges (#182014) ## Summary Original problem: `PropsWithChildren` require a generic type parameter (there's no default). This was not made visible in the merged PR, because we had type-checking on the PRs temporarily (accidentally) removed. Thsi PR fixes the fallout from #181257 => Errors: https://buildkite.com/elastic/kibana-on-merge/builds/44454
Following up on #181257, adding `PropsWithChildren` to the types which were missed.
|
@patrykkopycinski - this PR is incorrectly marked with the label I've a related PR that patched a few things after this (#182014) and that's also pending backports to 8.14. If this one will not be backported, my PR should also not be. |
|
The react 18 bump will not make it to 8.14, so this change probably won't need to be backported to 8.14. So I'll remove the incorrect labeling on this, and on my fix PR as well. |
Summary
Prep work for React@18 bump
tl;dr In React@18
React.FCdoesn't containchildrenanymore, so in order to make the bump easier I have decided to split the effort in multiple faces and hopefully this will make it easier for everyoneThis PR focuses only on adding explicit
childrendeclaration either by usingReact.PropsWithChildrentype or by addingchildren: React.ReactNodeto the existing props typesDefinitelyTyped/DefinitelyTyped#46691