Fix Release Tag Inheritance and Enable Default Tag Insertion#7
Merged
Conversation
Resolves non-deterministic formatting where interface members incorrectly received @internal tags instead of inheriting release tags from their parent interfaces. This issue only occurred in files with multiple exports and caused formatting to be non-idempotent. Key changes: - Enhanced ast-analyzer.ts to properly detect container members and inherit export status from parent interfaces/classes - Fixed format.ts to preserve original release tag state and prevent incorrect tag removal from explicitly tagged members - Added comprehensive inheritance detection with fallback to heuristics - Ensured formatting operations are deterministic across multiple runs Includes new test coverage for idempotence scenarios and interface member inheritance behavior. All existing functionality remains intact.
…rted APIs Resolves API Extractor compatibility issues where exported declarations with empty /** */ comments were missing required release annotations. This enables automatic insertion of default release tags (like @internal) for exported APIs. Key changes: - Enhanced TSDoc candidate detection in tsdoc-preprocess.ts to process empty comments on exported declarations when defaultReleaseTag is configured - Added comprehensive example testing pipeline with API Extractor validation - Created release-annotations.ts example demonstrating automatic tag insertion - Maintains backward compatibility while enabling full API documentation workflows The plugin now supports complete TypeScript library documentation pipelines from empty TSDoc comments to properly annotated APIs that pass API Extractor validation without warnings.
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.
This PR resolves critical issues with TSDoc release tag handling that were causing non-deterministic formatting and API Extractor compatibility problems. The changes enable proper inheritance detection for interface members and automatic default tag insertion for exported APIs with empty comments.
Issues Resolved:
@internaltags instead of inheriting from their @public parent interfaces/** */comments on exported declarations caused API Extractor warnings about missing release annotations