Skip to content
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

@description tag missing from default #2618

Closed
Bugs5382 opened this issue Jun 26, 2024 · 4 comments
Closed

@description tag missing from default #2618

Bugs5382 opened this issue Jun 26, 2024 · 4 comments
Labels
enhancement Improved functionality

Comments

@Bugs5382
Copy link

Search Terms

description,since,block

Problem

Like @since (#2614), @description is a valid JSdoc tag. When properly used in an IDE it shows up like this:

From:

image

To:

image

... in the rendered view indicating more description/expanding from the "title." It might have been removed as the default by accident.

Suggested Solution

I am working on a PR.

@Bugs5382 Bugs5382 added the enhancement Improved functionality label Jun 26, 2024
Bugs5382 added a commit to Bugs5382/typedoc that referenced this issue Jun 26, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jun 26, 2024

If there's both a description at the beginning of a JSDoc comment and a description provided with the @description tag, the description specified with the@description will override the description at the beginning of the comment. - JSDoc

This behavior is not respected by typedoc, and frankly it sounds like a terrible idea to me, which is why @description is not included in the list of default tags.

As your IDE obviously isn't following this behavior either, my question is - why is this tag useful over just including a paragraph break in the comment summary section?

/**
 * Some docs
 *
 * More docs that were previously under `@description
 */

@Bugs5382
Copy link
Author

@Gerrit0 I see the “title” of the function/code as one thing and a more description about what it does in its own section. While I can see this as a burden to add, JSDOC shows https://jsdoc.app/tags-description being a type. Though it notes that the tag overrides the rest of the comment.

The https://jsdoc.app/tags-summary tag seems to be the “short” description and/or summary of what the long stuff. Maybe switch this out for @summary ,,,,

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jun 26, 2024

It sounds like what you want is provided by TypeDoc's @remarks tag.

The @summary tag isn't a great fit either as typedoc renders the non-tagged content first.

@Bugs5382
Copy link
Author

@Gerrit0 Remarks it is! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants