Skip to content

@internal interface still shown in 'Implements' panel and 'Implementation of' footers of implementing class #3099

@gthb

Description

@gthb

Search terms

@internal, @hidden, excludeInternal, "Implements", "Implementation of", heritage clauses

Expected behavior

When an interface is hidden (@internal with excludeInternal, or @hidden), references to it from a documented implements-er should also be scrubbed:

  • it should not appear in the class's Implements panel, and
  • implemented methods should not show an Implementation of Foo.bar footer pointing at it.

Actual behavior

The Implements panel still lists the hidden interface (as plain text, since the page wasn't generated), and each implemented method still renders Implementation of Foo.bar referencing it. TypeDoc emits

Host, defined in .../host.ts, is referenced by Manager but not included in the documentation

so it knows the reference is dangling, but renders the heritage display anyway.

The same happens with @hidden (so it's not specific to excludeInternal), and whether the implementer is a class or an interface (e.g. via export type { default as Manager }).

Minimal reproduction

src/host.ts:

/** @internal */
export type Host = {
  adjust(at: number, count: number): void,
};

src/manager.ts:

import type { Host } from './host';

export default class Manager implements Host {
  adjust (at: number, count: number): void {
    void at; void count;
  }
}

src/index.ts:

export { default as Manager } from './manager';

typedoc.json:

{
  "entryPoints": ["src/index.ts"],
  "out": "docs",
  "excludeInternal": true
}

Run npx typedoc and open docs/classes/Manager.html. It contains:

<section class="tsd-panel">
  <h4>Implements</h4>
  <ul class="tsd-hierarchy">
    <li><span class="tsd-signature-type">Host</span></li>
  </ul>
</section><aside class="tsd-sources">
  <p>Implementation of Host.adjust</p>
  <ul><li>Defined in <a href=".../manager.ts#L4">manager.ts:4</a></li></ul>
</aside>

Both of those reference the Host type, which is @internal and I've specified "excludeInternal": true.

What I expect instead:

  1. the <section> with the Implements heading shouldn't be emitted at all.
  2. the <aside> for adjust should omit the <p>Implementation of Host.adjust</p>, leaving just:
<aside class="tsd-sources">
  <ul><li>Defined in <a href=".../manager.ts#L4">manager.ts:4</a></li></ul>
</aside>

Environment

  • TypeDoc: 0.28.19 (also 0.28.18)
  • TypeScript: 5.9.x
  • Node.js: v22
  • OS: macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions