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

feat: merge JSDoc when @inheritdoc tag is used #201

Open
2 tasks done
jordimarimon opened this issue Apr 9, 2023 · 0 comments
Open
2 tasks done

feat: merge JSDoc when @inheritdoc tag is used #201

jordimarimon opened this issue Apr 9, 2023 · 0 comments
Assignees
Labels
feature Feature requests. Please vote with reactions!

Comments

@jordimarimon
Copy link
Owner

jordimarimon commented Apr 9, 2023

Prerequisites

Describe the Feature Request

When a symbol has in it's JSDoc comment the @inheritdoc block tag, it should inherit the JSDoc from the specified symbol or the parent class.

See: https://jsdoc.app/tags-inheritdoc.html

Example:

/**
 * This is the description of the class A
 * 
 * @slot fallback - This is a slot that shows when there is an HTTP error
 */
export class A extends HTMLElement {
}

/**
 * This is the description of the class B
 *
 * @slot loading - This is another slot that shows when data is being loaded
 * @inhertidoc
 */
export class B extends A {
}

The JSDoc comment of the class B should include the @slot tag of the parent class. The JSDoc comment should be merged in a way that everything in class A that hasn't been overridden in class B is included.

Describe the Use Case

This will help developers to not repeat the JSDoc comments in every child class/interface.

Describe Preferred Solution

No response

Describe Alternatives

No response

Related Code

No response

Additional Information

No response

@jordimarimon jordimarimon self-assigned this Apr 9, 2023
@jordimarimon jordimarimon added the feature Feature requests. Please vote with reactions! label Apr 9, 2023
@jordimarimon jordimarimon changed the title feat: merge JSDoc of parent class or interface feat: merge JSDoc comment of parent class/interface Apr 9, 2023
@jordimarimon jordimarimon changed the title feat: merge JSDoc comment of parent class/interface feat: merge the documentation comment of parent class/interface Aug 16, 2023
@jordimarimon jordimarimon changed the title feat: merge the documentation comment of parent class/interface feat: merge documentation comments when @inheritdoc tag is used Oct 1, 2023
@jordimarimon jordimarimon changed the title feat: merge documentation comments when @inheritdoc tag is used feat: merge JSDoc when @inheritdoc tag is used Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature requests. Please vote with reactions!
Projects
None yet
Development

No branches or pull requests

1 participant