question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Better source comments/documentation in packages

See original GitHub issue

Describe the problem

Familiarizing myself with the internal package source code has been frustrating. Some of the more complex functions can be fairly opaque. The JSDoc type declarations are useful, but it seems like a missed opportunity to be using them exclusively as type declarations when we could add more descriptive information. I understand that investing too heavily into internal documentation pre-1.0 might cause some headaches if there are significant changes to the codebase, but I think the benefits probably outweigh that.

Describe the proposed solution

  • Add basic descriptions to JSDoc annotations. Short function and parameter descriptions like the ones described on the JSDoc website are probably all this needs.
  • [nice to have] Configuration for JSDoc site generation to create some human-readable docs for development purposes.
  • Add some instructions for updating the JSDoc descriptions to CONTRIBUTING.md

Alternatives considered

Wait until 1.0 release, when more stability can be expected for the internal packages.

Importance

nice to have

Additional Information

I’m happy to work on this incrementally as I go through the codebase and learn how it all works.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
benmccanncommented, Feb 3, 2022

Yeah, I agree with all that

0reactions
JEbertPrimecommented, Feb 3, 2022

I’ll open up a PR for some small changes just to hammer out the process and reference this issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Write Doc Comments for the Javadoc Tool - Oracle
Our documentation comments define the official Java Platform API Specification. To this end, our target audience is ... For more details, see: Source...
Read more >
Best practices for writing code comments - Stack Overflow Blog
Best practices for writing code comments. While there are many resources to help programmers write better code—such as books and static ...
Read more >
aaron-bond/better-comments - GitHub
The Better Comments extension will help you create more human-friendly comments in your code. With this extension, you will be able to categorise...
Read more >
Go Doc Comments - The Go Programming Language
“Doc comments” are comments that appear immediately before top-level package, const, func, type, and var declarations with no intervening newlines. Every ...
Read more >
Writing symbol documentation in your source files
To help the people who use your API have a better understanding of it, follow the steps in the sections below to add...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found