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
Generate TypeScript definitions from docs #2561
Comments
I think this would be a fantastic idea. I know little about TS or Flow definitions, but if they could be generated from our signatures, it would be a huge win, even if our signatures need some updating to make it work. But it would take someone who understands TS/Flow pretty well to implement this, I think. Any volunteers? |
Contributors of https://github.com/types/npm-ramda can be a great help on this. They know enough HM and TS 💪 I think. |
@tycho01: What do you think? Would this be a good idea? Would you be interested in participating? |
This is a fun idea. It begs the question why the types in The Hindley-Milner type signatures definitely served as the obvious starting point, but TS typings had their own challenges, which the signatures don't evidently help address. In Haskell we have data classes, and HM is fine, but with a structural typing system like TypeScript, preserving object key info is essential to safely distinguish say a Now, if one were to navigate such an object using e.g. Things I consider remaining challenges in typing Ramda, blocked by present language features:
I haven't been doing much TypeScript anymore (now Scala/Python at work, Haskell at night), but there's nothing to say you should take a similar focus as others! On typing Ramda, I'd be kinda interested to see/try a serious attempt using Flow -- I think its |
Surfing the web I stumbled upon this Hindley-Milner parser written in JS. I immediately saw the possibility of to generate the TS definitions -and possibly Flow- from Ramda docs. What's your thoughts about it guys?
The text was updated successfully, but these errors were encountered: