Typedoc: How do I suppress documentation for inherited symbols from being displayed in the page for an interface?

Created on 12 Jul 2018  路  8Comments  路  Source: TypeStrong/typedoc

I have an interface IOrderedDataFrame that extends IDataFrame.

Typedoc by default seems to copy all the documentation from IDataFrame to IOrderedDataFrame which means that the two functions added by IOrderedDataFrame are lost in the noise.

I'd like to be able to disable the inheritance of documentation so it's clear the functions that IOrderedDataFrame adds to DataFrame. Is this possible?

Please see screenshot.

typedoc issue

Most helpful comment

Just wanted to point that these inherited docs get very noisy when using external libraries like react. Your class documentation is just flooded with stuff inherited from say React.component that is usually of no use for anyone using the component.

All 8 comments

Just wanted to point that these inherited docs get very noisy when using external libraries like react. Your class documentation is just flooded with stuff inherited from say React.component that is usually of no use for anyone using the component.

Would like to know about this as well.

If you use the default theme you can filter methods at the top of the page using the three checkboxes 'Inherited', 'External' and 'Only Exported', like this.

Has anyone found an answer for this?

It would be really helpful to be able to suppress the inherited members from a specified list of classes, for example, or things inherited from external libraries.

When defining a custom element class, for example, you need to extend HTMLElement. If you have defined your own superclass based on HTMLElement and subclasses, you really want to see the inherited stuff from your own library, without the six pages of DOM APIs.

Take a look at typedoc-plugin-no-inherit.

@Gerrit0 Thanks! It turns out that plugin doesn't fix my problem, but it might point me in the direction of solving it for myself.

@Gerrit0 @aciccarello

Hey guys, while working on the plugin, I've found that the way Typedoc identifies inherited declarations might not be right.

export class CustomError extends Error {
  public test: string;
}

If you generate docs for this class, then toggle the Inherited checkbox, the static Error declaration still exists, despite coming from the super class. This means the plugin also can't identify it as inherited. See https://github.com/jonchardy/typedoc-plugin-no-inherit/issues/8.

That does seem like a Typedoc bug, it looks like it's been reported before (or a related issue) and just hasn't been resolved yet. #572

Was this page helpful?
0 / 5 - 0 ratings