Generate types from JSDoc#47
Conversation
|
@fergiemcdowall Is this something you'd be interested in? At the moment I'm extracting what I can from the docs and code comments where I can find them, but long-term this should be a lot more maintainable (and possibly testable) than a separate |
|
Yes absolutely 👍👍 (I see that |
|
For some reason I'm not able to output all the types to:
So for now I'm just using the default (that works) of outputting the |
9b85264 to
a698bab
Compare
a698bab to
cef8144
Compare
|
I havent really been using Typescript lately- what is the best way to verify that the Types are correct? Say we get a PR that breaks a type- how do we run a test that picks that up? |
|
I've completed a first round of types generated from JSDoc now and it would be awesome if someone can help me review that the types I've documented/generated are correct. Generated types are not as good as manually created types, for instance:
It's possible that's due to me not understanding how to do that - if someone knows how to address the above please go for it ;)
I think the best we can do is to add |
Instead of maintaining separate
@types/*it would be nice to have types generated and shipped with the package.This PR adds support for generating
*.d.tsfrom JSDoc style comments.