feat: append @example tags to member bodies#10
Open
jaiswalabhishek377 wants to merge 2 commits intowebpack:mainfrom
Open
feat: append @example tags to member bodies#10jaiswalabhishek377 wants to merge 2 commits intowebpack:mainfrom
jaiswalabhishek377 wants to merge 2 commits intowebpack:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds explicit rendering of @example JSDoc tags into the generated Markdown output for signatures in the custom doc-kit TypeDoc theme, so examples appear as dedicated “Example” sections near the signature documentation.
Changes:
- Extract
@exampletags from the resolved signature comment (or parent comment) and render them as Markdown sections. - Append generated example sections to the
signature()partial output.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5
Summary
Implements rendering of @example JSDoc tags in generated member bodies. Previously, @example tags in TypeScript source comments were silently dropped during doc generation. This PR extracts them via comment.getTags('@example') and appends each as a dedicated section using the existing getCommentParts() helper.
What kind of change does this PR introduce?
feat : append @example tags to member bodies
Did you add tests for your changes?
No tests added. The repository does not currently have a test suite for theme partials. Happy to add one if the maintainer points me to the preferred testing approach.
Does this PR introduce a breaking change?
No. The change only adds new output (example sections) when @example tags are present. Members without @example tags are unaffected.
If relevant, what needs to be documented once your changes are merged or what have you already documented?
No documentation changes needed. The feature follows the existing JSDoc tag convention already used in the codebase (@returns, etc.).
Use of AI
The logic was reviewed and validated manually.