Skip to content

Added support for @abstract tag #2693

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

Merged
merged 3 commits into from
Sep 6, 2024
Merged

Conversation

waynemwashuma
Copy link
Contributor

Fixes #2692

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 29, 2024

I think if typedoc is to support this tag, it should actually support it, and make it mark the reflection abstract. There are examples in CommentPlugin which do this already.

I also think this should be marked as a modifier tag, not a block tag

@waynemwashuma
Copy link
Contributor Author

Currently when building docs, the abstract class is marked as such.
Screenshot 2024-08-30 05-13-49
I thought that this means it is internally supported or is there something else to be done?
Currently have no explicit plugins for typedoc unless the CommentPlugin is an internal one and set on by default.

Ive also moved the tag to modifier type.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 30, 2024

The CommentPlugin is an internal one, as you suspected.

TypeDoc has some default rendering rules for tags. If you did @someRandomTag typedoc would produce a header with Some Random Tag

I don't want to just rely on the default rendering here as TypeDoc has real handling for TypeScript's abstract keyword, and I think @abstract should be an alternative for projects using JS rather than being slightly different.

@waynemwashuma
Copy link
Contributor Author

Ok, i might be able to connect the typescript implementation to the jsdoc javascript one but im not completely conversant with the codebase.

If one goes ahead to implement this,how will it be done?

Also,if this is not within your plans, ill leave it here.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 31, 2024

All that should be necessary is adding another case for @abstract like there is for @private here:

if (comment.hasModifier("@private")) {
reflection.setFlag(ReflectionFlag.Private);

@Gerrit0 Gerrit0 merged commit 15ba2dd into TypeStrong:master Sep 6, 2024
5 checks passed
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Sep 6, 2024

Thanks!

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.

Add support for @abstract tag
2 participants