downshift-js / downshift

🏎 A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components.
http://downshift-js.com/
MIT License
12.05k stars 933 forks source link

React.HTMLProps is not a thing in Flow #657

Open FezVrasta opened 5 years ago

FezVrasta commented 5 years ago

Problem description:

Your Flow type definitions make use of React.HTMLProps, but this type doesn't exist in Flow.

https://github.com/paypal/downshift/blob/master/flow-typed/npm/downshift_v2.x.x.js.flow#L143

Suggested solution:

Maybe $Shape<HTMLSomething> will produce something similar.

silviuaavram commented 5 years ago

thanks for the report. I am not familiar at the moment with those types and Flow in general, so it may take some time for me to find a solution to this. if you can find the proper one and create a PR for it, along with explanation, it may be better for everyone. Thanks!

FezVrasta commented 5 years ago

Just to understand, the Flow types have been automatically generated, but they can be changed independently without being "reset" by a new auto generation, right?

Do we have some tests to verify the types?

silviuaavram commented 5 years ago

as I mentioned, I'm not familiar at the moment with this. maybe @kentcdodds ?

kentcdodds commented 5 years ago

Actually @stereobooster did most of the work for flow stuff.

stereobooster commented 5 years ago

Hey. Type signatures were automatically generated, but I edited them manually after. So if you want to create a PR, you are more than welcome. Changes won't be reseted by auto-generation script.

I tried to create some tests for type signatures, but as you can see they don't work.