Skip to content

Conversation

@skovmand
Copy link
Contributor

Hi José.

Here's a proposal for identical JSDocs in both typings and library.

In the library I have added a newline for readability, and then copied the JSDoc into the typings. The benefit of having the JSDoc in the typing is that e.g. Visual Studio Code will show the JSDoc when you hover over a method in the library.

So when JSDocs change in the library in the future, they should be updated in the typings too.

I did wonder whether the JSDocs could be more simple in the library, also now that there's Typescript typings too, but maybe some people use them, and some use the typings?

If you have any comments please let me know.

Regards, Niels.

@coveralls
Copy link

coveralls commented Oct 23, 2016

Coverage Status

Coverage remained the same at 97.973% when pulling 5c4c9d9 on skovmand:identical-typescript-jsdocs into e4bd6fd on JMPerez:master.

@JMPerez JMPerez merged commit 0a4ea1a into JMPerez:master Oct 23, 2016
@JMPerez
Copy link
Owner

JMPerez commented Oct 23, 2016

@skovmand I use the JSDoc comments to generate the documentation page. And I guess people find it useful too when browsing the methods on their editor. At least that is my thought, from a non-Typescript developer.

For now it is fine to have them at least in sync. ideally they would be in the code only once, but it is better to have the methods well documented than striving for avoiding duplication at this stage.

Thanks again for the contribution!

@skovmand skovmand deleted the identical-typescript-jsdocs branch October 23, 2016 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants