Skip to content

Undocumented void return value produces warning #2644

@jpikl

Description

@jpikl

Search terms

notDocumented, void, return warning

Expected Behavior

Typedoc should not produce warning for undocumented void return value of arrow functions.

Actual Behavior

Typedocs warns about void return value not being documented.

Steps to reproduce the bug

index.ts

/**
 * This one is OK.
 *
 * @param value - Value.
 */
export function voidFunction(value: unknown): void {
    // ...
}

/**
 * This one produces the following warning:
 * 
 * > [warning] voidLambda (CallSignature), defined in ./index.ts, does not have any documentation
 *
 * @param value - Value.
 */
export const voidLambda = (value: unknown): void => {
    // ...
};

/**
 * This one does not produce warning.
 *
 * @param value - Value.
 * @returns Workaround (return docs which should not be necessary here).
 */
export const voidLambdaFixed = (value: unknown): void => {
    // ...
};

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.26.4
  • TypeScript version: 5.5.3
  • Node.js version: 20.13.0
  • OS: Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions