The new update on typescript (2.4.1) has some compatibility issue with the react-select types.
"node_modules/@types/react-select/index.d.ts(472,40): error TS2314: Generic type 'Component
' requires 2 type argument(s)."
Hi @junibrosas we don't use Typescript anywhere in the codebase, so not sure where it gets these types from. Maybe from some other repo?
Potentially: https://www.npmjs.com/package/@types/react-select
@junibrosas You should try updating your version of @types/react to latest. It should resolve that issue. I just installed @types/react version 16.0.2 and I'm all set. I'm also using Typescript version 2.4.2. In version 2.3 Generic parameter defaults were released which is related to this typings change. It's a nice feature if you're doing a lot with generics.
I hope this info helped.
@JoeRall You are correct. I installed the latest @types/react, @types/react-select, and typescript.
npm install @types/[email protected] @types/react-select [email protected] --save-dev
@junibrosas Glad to hear!
@agirton I guess this issue is safe to close.
Thanks!
Most helpful comment
@junibrosas You should try updating your version of
@types/reactto latest. It should resolve that issue. I just installed @types/react version 16.0.2 and I'm all set. I'm also using Typescript version 2.4.2. In version 2.3 Generic parameter defaults were released which is related to this typings change. It's a nice feature if you're doing a lot with generics.I hope this info helped.