downshift icon indicating copy to clipboard operation
downshift copied to clipboard

React.HTMLProps is not a thing in Flow

Open FezVrasta opened this issue 5 years ago • 5 comments

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.

FezVrasta avatar Jan 29 '19 16:01 FezVrasta

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!

silviuaavram avatar Jan 31 '19 15:01 silviuaavram

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?

FezVrasta avatar Jan 31 '19 15:01 FezVrasta

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

silviuaavram avatar Feb 01 '19 17:02 silviuaavram

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

kentcdodds avatar Feb 01 '19 17:02 kentcdodds

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.

stereobooster avatar Feb 01 '19 23:02 stereobooster