-
-
Notifications
You must be signed in to change notification settings - Fork 743
Description
Search terms
The signature Foo.constructor has an @param with name "bar", which was not used
Expected Behavior
The behavior from TypeDoc versions 0.26.1 and below is expected. The documentation should not exclude documented parameters, nor should it warn about unrelated properties.
Actual Behavior
When a parent class (A
in this example) has an excluded property (a
in this example) with a name that matches the name of a child class' (B
in this example) constructor parameter, a warning is given and the parameter is excluded from the documentation.
Steps to reproduce the bug
-
Install TypeDoc version 2.6.2, 2.6.3, or 2.6.4.
-
Enable
excludeInternal
in your TypeDoc configuration. -
Use a file with the following contents as an entrypoint.
export abstract class A { protected constructor(a: number) { this.a = a; } /** @internal */ public readonly a: number; } export class B extends A { /** @param a */ public constructor(a: number) { super(a); } }
-
Execute
typedoc
.
The following warning messages will be displayed:
[warning] The signature B.constructor has an @param with name "a", which was not used
[info] Documentation generated at ./docs
[warning] Found 0 errors and 1 warnings
Additionally, the generated documentation will exclude a
from the constructor of B
:
Environment
- TypeDoc version: 2.6.4
- TypeScript version: 5.4.5
- Node.js version: 22.3.0
- OS: Windows 11