-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[v2] Typescript typings for v2? #2860
Comments
I'd love to know that too. @JedWatson suggested that "he'd consider that after the final release of 2.0.0", but I did not find anything as for now |
@pondrejack Have you got a fork you can share that you've been working on this in? I'd be happy to contribute to improving the mappings. The Prop Update Guide should be pretty usable in order to sort this. Lemme know if you want some help. |
@JedWatson I'm keen to help with this, but also read your comments here and understand your potential reluctance in adding official TS support. Is that still your mindset? If so, I'm happy to do the work and lodge a pull-request with the @DefinitelyTyped crew. If you'd prefer official support be here, happy to work towards that too. Lemme know what you'd prefer. |
I'm also happy to help on a PR for the definitions with @DefinitelyTyped |
Same here :) |
same 👍 |
Hi @jonfreedman @burtek @m1lk1way I've created a new repo where I'm working on some of this in isolation. Basically just fleshing out an initial index.d.ts file which I'm slowly fleshing out based on the current @DefinitelyTyped one, and digging through the v2.0 docs and source code. Feel free to test it out in your own TS projects and see if you can find anything wrong with it. More than welcome to submit a PR if you have some time to expand on it. See it here: https://github.com/Jtango18/updated-react-select-ts-defs HTH Cheers JT |
@Jtango18 I have some changes I will create a PR for shortly, is there a reason you're targeting TypeScript Version: 3.0 ? It needs to be 2.9+ as that's when generic type arguments for JSX were introduced |
@jonfreedman Let's take these discussions over to the repo. |
Just to close this out typings for v2 have been published overnight @ https://www.npmjs.com/package/@types/react-select |
@jochenberger The typings are not working as it complains
|
@jochenberger I'm still facing this issue.
|
@aakashsigdel @Wezea do you have an example of how you're interacting with MouseEventHandler so we can incorporate into the DefinitelyTyped tests? Also as per DefinitelyTyped/DefinitelyTyped#27980 can you confirm you're using the latest @types/react version? |
I have the same problem because I'm using react 15. The typings of react 15 and 16 conflict with each other. |
I had the same issue, but installing |
Are the typings up to date now? I'm getting the following typing error when I try to pass the Property 'defaultValue' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ReactSelectClass> & Readonly<{ children?: ReactNode; }> & Readonly<ReactSelectProps>' I tried installing @types/react-select, but it didn't make a difference. Are the types in the main react-select package up to date now? Should I put together a PR to add this prop to @types/react-select? |
@davad That property is already there, so it's most likely some issue in your local installation. |
@FredyC Found the problem. Someone else had already added an old version of @types/react-select to the project. Updated to 2.0, and it's working right now. Thanks! |
Hello - In an effort to sustain the We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version. If you aren't using the latest version of However, if you feel this issue is still relevant and you'd like us to review it - please leave a comment and we'll do our best to get back to you! |
Is there a specific repo outside of @types/react-select or a working branch of @types/react-select for v2 typings? There are a lot of missing types like isMulti, isClearable, etc. Been working on PRing what I run into but new ones keep popping up.
The text was updated successfully, but these errors were encountered: