Skip to content

Documented constructor type produces warning #2553

Closed
@jpikl-prgs

Description

@jpikl-prgs

Search terms

notDocumented, constructor, warning

Expected Behavior

Running typedoc for fully documented constructor types should not produce any warnings.

Actual Behavior

The following warnings are produced:

[warning] Constructor.__type (ConstructorSignature), defined in ./index.ts, does not have any documentation.
[warning] TypedConstructor.__type (ConstructorSignature), defined in ./index.ts, does not have any documentation.

Steps to reproduce the bug

index.ts

/**
 * Constructor.
 *
 * @param args - Constructor arguments.
 * @returns New instance.
 */
export type Constructor = new (...args: any[]) => object;

/**
 * Typed constructor.
 *
 * @typeParam T - Class type.
 * @param args - Constructor arguments.
 * @returns New instance.
 */
export type TypedConstructor<T> = new (...args: any[]) => T;

tsconfig.json

{
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "skipLibCheck": true
  }
}

typedoc.json

{
    "entryPoints": ["index.ts"],
    "validation": {
        "notDocumented": true
    }
}

Environment

  • Typedoc version: 0.25.13
  • TypeScript version: 5.4.5
  • Node.js version: 20.10.0
  • OS: Linux

Notes

The latest typedoc where it worked was 0.25.4. The warnings started to appear after updating to 0.25.5 or higher,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions