-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
Option to inherit interface documentation by default #1498
Comments
I could have sworn we already did this... but apparently not... maybe I imagined it, or did it on a branch that never ended up getting merged. |
With 0.20.23 we do this by default, decided to treat this as a bug report since I was pretty sure we should have been doing this in the first place. |
Wow. All of my issues fixed in record time! Thank you @Gerrit0! |
This doesn't seem to work on more complex types (IDEs like vscode doesn't have this problem). Example: export interface A {
/**
* x
*/
x: number;
/**
* z
*/
z: number;
} interface B... export interface B {
/**
* y
*/
y: number;
} ... and class C: import { A } from "./interfaceA";
import { B } from "./interfaceB";
export class C implements Omit<A, "z">, B {
x = 0;
y = 0;
} Using the official typescript utility type Omit causes the documentation of interface A to disappear completely. |
Please open a new issue rather than posting in an old one. |
@harrydehix Did you create a new issue for this? Otherwise I will! |
This still appear to be a problem in version 0.24.8 - the docs from the interface doesn't follow into the class implementing it unless I add inheritDoc to every method |
Please open a new issue rather than posting in an old one. |
Search Terms
inheritdoc, inherit documentation, configuration option
Problem
Class methods/accessors/properties that implement interface members do not inherit the interface's documentation.
This very annoying because the reader has to click on the
Implementation of X
note to be able to read the documentation of class members.IDEs like VSCode do not have this problem. They will display the interface's documentation for inherited members if the implementation doesn't define its own documentation.
Example: No documentation at definition site
But VSCode still displays documentation.
The only current solution for this problem is to add a
/** @inheritDoc */
to all class members without documentation.Suggested Solution
Add a new configuration option that will add an implicit
@inheritDoc
if a class member does not define its own documentation.At least, this is how the solution is supposed to behave. It may be implemented differently of course.
The text was updated successfully, but these errors were encountered: