facebook / react-strict-dom

React Strict DOM (RSD) standardizes the development of styled React components for web and native.
https://facebook.github.io/react-strict-dom
MIT License
3.15k stars 160 forks source link

[Chore] Simplify the generation of the type definition files #223

Open nmn opened 1 week ago

nmn commented 1 week ago

React Strict DOM has a single file for Flow type definitions and a single file for TS type definitions.

The build step for this is fairly complex, however:

The script that concatenates the types from all the files is brittle and can break if we accidentally use the same type name in different files.


We should be able to simplify this process by using this Rollup-like bundler that understands Flow syntax.

We will need to wait for this bundler to be migrated to the hermes repo and open-sourced as a standalone package.

necolas commented 1 week ago

React Strict DOM has a single file for Flow type definitions and a single file for TS type definitions.

I don't think that has been the case for a while. But it would be good to go back to 1-file libdefs using the flow bundler at some point