Skip to content

Callable variables use signature comment instead of variable comment #2042

@VorontsovMaxim

Description

@VorontsovMaxim

Search terms

Callable variable object property

Expected Behavior

Written callable variable documentation should be included in the HTML output.

Actual Behavior

Written callable variable documentation is not included in the HTML output.

Steps to reproduce the bug

const obj = {
    /** function-docs */
    fn(x: unknown) {}
}

/**
 * exported-docs
 * @param x param-docs
 */
export const bug = obj.fn;

Only function-docs string is included in the HTML output, but not exported-docs string, neither as param-docs string.

But when you remove docs of function declaration exported-docs and param-docs appears in the HTML output.

const obj = {
    fn(x: unknown) {}
}

/**
 * exported-docs
 * @param x param-docs
 */
export const bug = obj.fn;

Here's repro PR: TypeStrong/typedoc-repros#20

Environment

  • Typedoc version: 0.23.11
  • TypeScript version: 4.8.2
  • Node.js version: 16.17.0
  • OS: macOS 12.4

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