[Fix] fix type issues from unparameterized PropsWithChildren type usages#182014
[Fix] fix type issues from unparameterized PropsWithChildren type usages#182014mistic merged 4 commits intoelastic:mainfrom
Conversation
… API Docs build's step
|
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
|
|
||
| export const FieldStatsFlyoutProvider: FC<{ | ||
| children: React.ReactNode; | ||
| children?: React.ReactNode; |
There was a problem hiding this comment.
This was causing an error in x-pack/plugins/ml/public/application/components/field_stats_flyout/field_stats_flyout_provider.tsx if left as a required field
|
|
||
| const renderUseMetricsExplorerDataHook = () => { | ||
| const wrapper: FC<PropsWithChildren> = ({ children }) => { | ||
| const wrapper: FC<PropsWithChildren<any>> = ({ children }) => { |
There was a problem hiding this comment.
This was an any prior to the original PR as well, by committing the type for FC, this just makes it explicit. Would require a precise type.
| }; | ||
|
|
||
| export const TestProvidersComponent: FC<PropsWithChildren> = ({ children }) => ( | ||
| export const TestProvidersComponent: FC<PropsWithChildren<any>> = ({ children }) => ( |
There was a problem hiding this comment.
If left as unknown it would cause issues where TestProvidersComponent is used
💚 Build Succeeded
Metrics [docs]Any counts in public APIs
History
To update your PR or re-run it, just comment with: |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
2 similar comments
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary
Original problem:
PropsWithChildrenrequire 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