react 16.8.4
react-dom 16.8.4
react-select 2.4.3
@types/react-select 2.0.17
typescript 3.2.2
I get this error once I add the @types/react-select package to my project and then building (no error without the types package)
TypeScript error: node_modules/@types/react-select/lib/components/indicators.d.ts(19,13): Error TS2314: Generic type 'ReactElement<P>' requires 1 type argument(s).
Thanks!
This is certainly weird because https://github.com/DefinitelyTyped/DefinitelyTyped/blob/7c33a958277e53aa335dcddec28ebfe6502638ca/types/react-select/lib/components/indicators.d.ts line 19 says:
children: ElementType<any>,
So perhaps the npm package @types/react-select is out of date? (I am using 2.0.17)
Looks like moving back to 2.0.8 of the @types/react-select package solves this issue.
Note: You will then run into the problem outlined at https://stackoverflow.com/questions/54698733/types-react-transition-group-generic-type-reactelementp-t-requires-betwee/56135556#56135556. Follow my answer there for how to resolve that as well and finally build.
Hi @sathiathirumal, wanted to check in and see if you resolved this properly.
This issue will now be closed due to inactivity. If anyone can provide further feedback, the issue will be re-opened.
Most helpful comment
Looks like moving back to 2.0.8 of the @types/react-select package solves this issue.
Note: You will then run into the problem outlined at https://stackoverflow.com/questions/54698733/types-react-transition-group-generic-type-reactelementp-t-requires-betwee/56135556#56135556. Follow my answer there for how to resolve that as well and finally build.