typings / registry

The registry of type definitions for TypeScript
238 stars 176 forks source link

theon initial typings #957

Closed effervescentia closed 7 years ago

effervescentia commented 7 years ago

Typings URL: https://github.com/effervescentia/typed-theon

Questions (for new typings):

unional commented 7 years ago

LGTM

blakeembrey commented 7 years ago

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.

effervescentia commented 7 years ago

@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

blakeembrey commented 7 years ago

@effervescentia What were they generated from?

effervescentia commented 7 years ago

@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

blakeembrey commented 7 years ago

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.

effervescentia commented 7 years ago

@blakeembrey agreed 😄 Does a tool like that exist yet? (One that generates typings from JSDoc comments)

blakeembrey commented 7 years ago

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.