Closed effervescentia closed 7 years ago
LGTM
You shouldn't need all those JSDocs when there's already type annotations. I see at least on spot where they're inconsistent: https://github.com/effervescentia/typed-theon/blob/54b43ad8410eb46d12b3b4fc7c7ebd8f7169f121/lib/theon.d.ts#L294. Also, it'd probably be good to remove all the template [description]
blocks.
@blakeembrey fair enough. I only left them in as they were autogen'd and it seemed like more of a pain to go through and remove them. But you're right, no point leaving in JSDocs comments that will inevitably get out of sync
@effervescentia What were they generated from?
@blakeembrey Well I wanted to have the existing JSDocs comments that were in the repo, as I quickly find this library get's difficult to deal with, lot's of circular references. The params were auto-generated for every /**
block I opened in atom. Wasn't really thinking about it as I was doing it 😝 very late at night
I see. I thought maybe you generated the whole definition with a tool or something 😄 It makes sense to add JSDoc comments for intellisense - makes it 100x easier for people to use in the editor instead of having to refer to documentation.
@blakeembrey agreed 😄 Does a tool like that exist yet? (One that generates typings from JSDoc comments)
You could try https://github.com/Microsoft/dts-gen. I haven't tested it myself, but if it's based on the TypeScript compiler parsing JS, it should work.
Typings URL: https://github.com/effervescentia/typed-theon
Questions (for new typings):
index.js
<->index.d.ts
)?