-
Notifications
You must be signed in to change notification settings - Fork 149
feat: implement new {@link {beta-declaration-reference}} syntax
#469
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -26,6 +26,24 @@ export class TSDocParser { | |||||||||||||||||
| } | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| /** | ||||||||||||||||||
| * Creates a TSDocParser instance that supports the beta declaration reference format. | ||||||||||||||||||
| * This format uses double curly braces `{{...}}` to enclose the reference, and a `!` character | ||||||||||||||||||
| * as a separator for package names. | ||||||||||||||||||
| * | ||||||||||||||||||
| * @remarks | ||||||||||||||||||
| * This is an opt-in feature. By default, the TSDocParser does not support this beta syntax. | ||||||||||||||||||
| * The returned parser instance will have its {@link TSDocParser.configuration} | ||||||||||||||||||
| * pre-configured to recognize the beta declaration reference syntax. | ||||||||||||||||||
| */ | ||||||||||||||||||
| public static createWithBetaDeclarationReferences(): TSDocParser { | ||||||||||||||||||
| const configuration: TSDocConfiguration = new TSDocConfiguration(); | ||||||||||||||||||
| // This method (assumed to exist in TSDocConfiguration) would internally modify | ||||||||||||||||||
| // the parsing rules for declaration references to recognize the beta syntax. | ||||||||||||||||||
| configuration.configureForBetaDeclarationReferences(); | ||||||||||||||||||
| return new TSDocParser(configuration); | ||||||||||||||||||
| } | ||||||||||||||||||
|
Comment on lines
+29
to
+45
|
||||||||||||||||||
|
|
||||||||||||||||||
|
Comment on lines
+40
to
+46
|
||||||||||||||||||
| const configuration: TSDocConfiguration = new TSDocConfiguration(); | |
| // This method (assumed to exist in TSDocConfiguration) would internally modify | |
| // the parsing rules for declaration references to recognize the beta syntax. | |
| configuration.configureForBetaDeclarationReferences(); | |
| return new TSDocParser(configuration); | |
| } | |
| return new TSDocParser(); | |
| } |
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.
This introduces a new public API surface (
createWithBetaDeclarationReferences) but there are no tests exercising it. Please add parser tests covering at least the examples from #202 (e.g.,{@link {package!MyClass}},{@link {Merged:interface}}, and the| link textform) to ensure the opt-in behavior works and doesn’t regress existing@linkparsing.