[React 18] Fix remaining TypeScript errors#6988
[React 18] Fix remaining TypeScript errors#6988tkajtoch merged 17 commits intoelastic:feature/react-18from
Conversation
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6988/ |
cee-chen
left a comment
There was a problem hiding this comment.
The majority of these PR comments are just this meme, apologies 😅
The only comment that's an actual cleanup change request is last 2 ones around basic table mobileOptions.render one.
By the way, when I pull down this branch and run yarn lint I'm still getting a bunch of TS failures around errors in our node_modules - is that something that's only happening in my local? Or is it something that we'll need to address in a separate PR?
| const setInputValidityRef = useCallback< | ||
| RefCallback<Component & { input: HTMLInputElement }> |
There was a problem hiding this comment.
Nice work figuring this one out - it looks like a huge pain 😅
src-docs/src/views/elastic_charts/metric/metric_chart_grid_column.tsx
Outdated
Show resolved
Hide resolved
src-docs/src/views/elastic_charts/metric/metric_chart_grid_row.tsx
Outdated
Show resolved
Hide resolved
src-docs/src/views/elastic_charts/metric/metric_chart_no_data.tsx
Outdated
Show resolved
Hide resolved
src-docs/src/views/elastic_charts/metric/metric_chart_single_value.tsx
Outdated
Show resolved
Hide resolved
| ) : ( | ||
| icon | ||
| ); | ||
| const iconRender = isValidElement(icon) ? ( |
There was a problem hiding this comment.
Nice catch/switch on this one as well!
…rops uses an overridden `button` type
…of `string | number | symbol`
b664f36 to
729a23b
Compare
cee-chen
left a comment
There was a problem hiding this comment.
🎉 Changes look great - thanks for the super speed!!
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6988/ |
Summary
This PR fixes types in places where they were previously
any,unknownor mistakenly ignored by{}being a part of theReactNodetype in React 17 and below.QA
yarnyarn tsc --noEmitand confirm there are no errors