-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Add TSDoc comments to @libp2p/interface #2927
base: main
Are you sure you want to change the base?
Conversation
The I think one PR that adds comprehensive documentation for all exported members may be too big a chunk of work, you may wish to perform this task as several smaller PRs that change a handful of files/dirs at a time. |
Sounds good @achingbrain. I can break this up into smaller PRs. |
@achingbrain @maschad would love to get some feedback. I can make this PR with what I have so far. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this. A lot of the comments here don't add much information that isn't obtainable from the types (e.g. field names/types) but it's better than what we have now.
Linting is failing in CI, can you please take a look?
The linting steps run in CI can be seen in main.yml.
You can fix all fixable linting issues by running
npm run lint -- -- --fix
..in the root of the repo, or
npm run lint -- --fix
..in each individual package.
*/ | ||
export class AbortError extends Error { | ||
/** | ||
* The name of the error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced this style of comment gives the reader any useful information.
There are many examples of this in this PR, too many to comment on them each individually.
As a rule, if all the comment is doing is repeating the name or the type of the property it's better off not having a comment at all since it doesn't add any more information that what is contained in the interface/field name/type.
docs: Add TSDoc comments to @libp2p/interface (#2112)
Description
This PR adds TSDoc comments to the public interfaces of
@libp2p/interface
, ensuring that the documentation is properly structured and generated using the@packageDocumentation
tag.Every exported interface, type, enum, and constant is documented according to the TSDoc standard.
Related issue: #2112
Notes & open questions
@maschad
I noticed that the original links in the issue no longer exist. Could you provide updated examples or confirm which specific files should be prioritized for these changes?
Change checklist