Skip to content

Support @copydoc or enhance @inheritdoc #304

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

Closed
samchon opened this issue Oct 11, 2016 · 1 comment
Closed

Support @copydoc or enhance @inheritdoc #304

samchon opened this issue Oct 11, 2016 · 1 comment

Comments

@samchon
Copy link

samchon commented Oct 11, 2016

I want some features to be added.

@copydoc

Copy definition from another one.

If I need to define same content on another object, then it's very annoying. Look at the below codes, then you may understand how I am suffering from duplicated definitions

@inheritdoc

The @inheritdoc feature in TypeDoc copies definition from its parent class. However, it's standalone. It doesn't allow using the @inheritdoc as subsidiary one.

Overriding a method means some logics are changed and some explanation is required. I want to combine @inheritdoc with customized comments explaining what is changed.

/**
 * This is the parent class.
 * 
 * Blah blah blah...
 */
class ParentClass
{
    /**
     * Do something.
     */
    public domSomething(): void
    {
    }
}

/**
 * This is a child class derived from the {@link ParentClass}
 *
 * #### [Inherited] {@link ParentClass}
 * @copy8doc ParentClass
 */
class ChildClass
{
    /**
      * On top of its parent, {@link ChildClass.doSomething} do something more.
      * 
      * @inheritdoc
      */
    public doSomething(): void
    {
    }
}
@blakeembrey blakeembrey added enhancement help wanted Contributions are especially encouraged labels Oct 11, 2016
@Gerrit0 Gerrit0 changed the title Support @copydoc or enhance @inehrtidoc Support @copydoc or enhance @inheritdoc Jan 16, 2021
@Gerrit0 Gerrit0 removed the help wanted Contributions are especially encouraged label Feb 20, 2021
@Gerrit0 Gerrit0 added this to the TSDoc milestone Feb 20, 2021
@Gerrit0 Gerrit0 mentioned this issue Apr 17, 2022
8 tasks
@Gerrit0 Gerrit0 removed this from the v0.23 milestone Jun 19, 2022
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Dec 28, 2023

TypedDoc's @inheritDoc supports copying documentation from another arbitrary documented symbol as of 0.23.

I'm really wary to add additional copying methods which won't be recognized by VSCode, and will result in worse docs for people using the language service to read documentation (the majority of declaration file use, in my experience)

I'm open to doing something like this if enough people want it, but a proposal like it needs to describe how it will play with comment tags, where it's permitted, when it is resolved, etc... I don't want to add a feature that few people know exists, and fewer how to use properly, like several existing features...

@Gerrit0 Gerrit0 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2023
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

No branches or pull requests

3 participants