rrdelaney / ReasonablyTyped

:diamond_shape_with_a_dot_inside: Converts Flow and TypeScript definitions to Reason interfaces
https://rrdelaney.github.io/ReasonablyTyped/
MIT License
518 stars 24 forks source link

Multiple modules #16

Closed bbqbaron closed 7 years ago

bbqbaron commented 7 years ago

From #15. This handles modules-within-modules according to the following logic. Certainly open to feedback, since I haven't written enough flow decls to know all the permutations!

Some changes are formatting; will annotate the one real change.

rrdelaney commented 7 years ago

Ok, so first off this is seriously amazing work 🎉 This is honestly fantastic!

The PR looks great overall! The only problem is having src/retyped take a dependency of jsoo. Right now it's compiled as a library dependency of the two modules insrc, meaning it can target native OCaml if you run jbuilder build src/cli.exe - hopefully we don't have to lose that.

Can we take a dependency on another OCaml regex library? Native target is really helpful for development speed.

You can test out the native target with jbuilder build src/cli.exe and then run ./_build/default/src/cli.exe -debug <my-file.js>

rrdelaney commented 7 years ago

This is perfect! Thanks for implementing this so quickly 😄 Do you think this is all good to merge?

bbqbaron commented 7 years ago

I'd say so; native and JS tests seem to work (where "native test" is just building cli.exe and running it on my test file).