Skip to content

feat: append @example tags to member bodies#10

Open
jaiswalabhishek377 wants to merge 2 commits intowebpack:mainfrom
jaiswalabhishek377:feat/append-example-tags
Open

feat: append @example tags to member bodies#10
jaiswalabhishek377 wants to merge 2 commits intowebpack:mainfrom
jaiswalabhishek377:feat/append-example-tags

Conversation

@jaiswalabhishek377
Copy link

@jaiswalabhishek377 jaiswalabhishek377 commented Mar 12, 2026

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.

Copilot AI review requested due to automatic review settings March 12, 2026 19:38
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 12, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: jaiswalabhishek377 / name: Abhishek Jaiswal (3e0599c, 8a5ff80)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 @example tags 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.

@jaiswalabhishek377 jaiswalabhishek377 mentioned this pull request Mar 12, 2026
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.

Examples

2 participants