Skip to content
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

chore: add additional jsdoc annotations for discovery module #30

Merged
merged 44 commits into from
Oct 3, 2022

Conversation

achou11
Copy link
Member

@achou11 achou11 commented Sep 19, 2022

Addresses #20

So far:

  • accidentally pushed 66b56ee to main but that would've been part of this too 😅
  • descriptions for methods of classes
  • example annotations
  • descriptions about classes

What's left:

  • descriptions about classes
  • example annotations

@achou11
Copy link
Member Author

achou11 commented Sep 20, 2022

@sethvincent working through adding examples and a couple of questions come up:

  • Is it safe to assume that for methods, we only add an example for the public ones?
  • How detailed should the examples be? Trying to balance between "detailed enough to basically copy-paste and have full-context" and "reduce noise caused by boilerplate and highlight the important bits". Any thoughts on what approach we should go with, or will it depend on what's being documented?

*
* ```js
*
* // Create identities...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be useful to list relevant methods for creating identities here and maybe link to their spot in the docs (not sure off the top of my head if that's possible from within example code using typedoc, so maybe this note would be outside the code block).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah makes sense! Another idea: not sure how it would look in the generated output but could put a (collapsible?) snippet for an example of creating the identity, as a footnote type of thing that can be referenced from here. Maybe too complicated so probably stick with your idea

@sethvincent
Copy link
Contributor

Yeah only public methods.

I think we should lean toward minimal examples as much as possible. The examples you've added so far look pretty good to me. I just added one comment about referencing/linking to related methods that would add too much boilerplate in a method's example.

@sethvincent sethvincent deleted the 20/discovery-docs branch October 3, 2022 15:45
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.

2 participants