-
Notifications
You must be signed in to change notification settings - Fork 712
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
Support for @inheritDoc as an inline tag #1480
Comments
TypeDoc doesn't support |
You'll also need to upgrade to 0.20.17 to get the redirected name behavior. |
I've upgraded and changed the syntax but now Prettier removes |
Prettier doesn't do that to me... Do you have some plugin installed that adds TSDoc support? If so, you might have to turn that off to use TypeDoc - it doesn't fully support TSDoc yet. |
I have eslint & eslint-plugin-tsdoc, does it can be that? |
eslint-plugin-tsdoc might be doing it - I don't use it, so not sure... |
I've tested your code sample on my project configured with esling-plugin-tsdoc and prettier and received only a warning:
Parameter was not deleted by linter. If you have an example project I can take a look why it was removed in your case. Concerning the warning, I believe there is an open issue in eslint-plugin-tsdoc to allow more flexible configuration for plugin rules. |
The code snippet is from the Event class. |
Thanks for the repro. I believe it is removed due to
configuration in your package.json "rules": {
"require-jsdoc": "warn",
"jsdoc/check-tag-names": "off",
"jsdoc/require-param-type": "off",
"jsdoc/require-returns-type": "off",
"jsdoc/empty-tags": "off" // this
} it will no longer be removed. It seems your project uses both jsdoc and tsdoc validation for ts files. Personally I'd configure to check TSDoc on .ts files and JSDoc on .js files. |
I added JSDoc checking to ensure that JSDoc is put on every function/class/method, and I do not have any JS files (apart from the automatically-generated documentation). |
Considering eslint-plugin-tsdoc does not currently have equivalent for require-jsdoc it seems acceptable to use both in this case, but probably only enable one specific rule from it (require-jsdoc) and leave other checks for eslint-plugin-tsdoc. Anyway, it's not a big deal and you should be fine with just disabling Other possible resolutions for your issue are either:
P.S. Have to take note on misleading message from eslint-plugin-tsdoc; while being an inline tag in their internal tag classification and being used without braces, it is reported by plugin as not inline tag which should not have bracers, although there weren't any. Weird. |
Okay okay, thanks for all this information, I think that I'm gonna wait for option 1 and keep the code like how it is for now. |
My understanding is that Typedoc have been around for 7 years while TSDoc only for 3 years and a lot of things inside TSDoc are ongoing process, so there was no standard for |
Okay, I see, thanks. |
Support added in 0.23: https://typedoc.org/tags/inheritDoc/ |
Hi, I'm on latest version 0.23.23 and it seems that my comments don't work for properties inhertied from an interface. export abstract class FooClass {
/** Describes what this method does */
public fooMethod(): void{
// do stuff
}
}
export interface BarInterface {
/** Describes the property */
barProp: string;
}
export class FooBarClass extends FooClass implements BarInterface{
/** {@inheritdoc BarInterface.barProp} */
public barProp: string=''; /** comments not inherited */
/** {@inheritdoc FooClass.fooMethod} */
public fooMethod(): void { /** comments inherited fine */
// do something first
super.fooMethod();
}
} |
Please open a new issue with bug reports rather than posting in old closed issues |
Sorry, that seemed the same issue to me, I'll post a new one. |
Search terms
inherited
Expected Behavior
Getting the got inherited.
Actual Behavior
When putting this code :
Getting literal
{@inheritDoc EventsOptions.name}
for name property.Environment
The text was updated successfully, but these errors were encountered: