Skip to content
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

Documented constructor type produces warning #2553

Closed
jpikl-prgs opened this issue Apr 23, 2024 · 1 comment
Closed

Documented constructor type produces warning #2553

jpikl-prgs opened this issue Apr 23, 2024 · 1 comment
Labels
bug Functionality does not match expectation

Comments

@jpikl-prgs
Copy link

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,

@jpikl-prgs jpikl-prgs added the bug Functionality does not match expectation label Apr 23, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 27, 2024

Signatures are the bane of my existence, there are entirely too many edge cases around them, so I always seem to miss at least one when touching that code...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

2 participants