-
Notifications
You must be signed in to change notification settings - Fork 860
[React 18] Fix remaining TypeScript errors #6988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[React 18] Fix remaining TypeScript errors #6988
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 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