Skip to content

Cannot get overload comment correctly for an interface with overloads #827

@ocavue

Description

@ocavue

What package is the bug related to?

typedoc-plugin-markdown

Describe the issue

For this InterfaceWithMixedOverloads taken from typedoc-plugin-markdown's test cases:

/**
 * Comments for InterfaceWithFunctionOverloads
 *
 * @inline
 */
export interface InterfaceWithMixedOverloads {
  /**
   * Comments for prop 1
   */
  prop1: string;
  /**
   * Comments for function 1
   */
  (options?: any): Promise<void>;
  /**
   * Comments for function 2
   */
  (signOutCallback?: any, options?: any): Promise<void>;
  /**
   * Comments for prop 2
   */
  prop2: string;
}

TypeDoc can output the Comments for function 1 and Comments for function 2 correctly, as shown below:

Image

But typedoc-plugin-markdown cannot output the comment for each overloads, as shown below:

Interface: InterfaceWithMixedOverloads()

Defined in: index.ts:4

Comments for InterfaceWithFunctionOverloads

Call Signature

InterfaceWithMixedOverloads(options?): Promise<void>

Defined in: index.ts:12

Comments for InterfaceWithFunctionOverloads

Parameters

options?

any

Returns

Promise<void>

Call Signature

InterfaceWithMixedOverloads(signOutCallback?, options?): Promise<void>

Defined in: index.ts:16

Comments for InterfaceWithFunctionOverloads

Parameters

signOutCallback?

any

options?

any

Returns

Promise<void>

Properties

prop1

prop1: string

Defined in: index.ts:8

Comments for prop 1


prop2

prop2: string

Defined in: index.ts:20

Comments for prop 2

Reproduction: https://github.com/issueset/typedoc-markdown-overloads

TypeDoc configuration

No response

Expected behavior

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue raised as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions