typedoc2md / typedoc-plugin-markdown

A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.
https://typedoc-plugin-markdown.org
MIT License
725 stars 177 forks source link

Param object trans head not ok #626

Closed jiawei397 closed 5 months ago

jiawei397 commented 5 months ago

What package is the bug related to?

typedoc-plugin-markdown

Describe the issue

This is the test.ts code:

/**
 * The application constructor.
 * @param param - The initial parameters.
 * @param param.container - The dom element to render scene.
 * @param param.background? - The background.
 */
class App {
  constructor(param: {
    container: HTMLElement;
    background?: number | string | Number[];
  }) {}
}

Now the param not ok:

# Class: App

The application constructor.

## Param

The initial parameters.

## Param

The dom element to render scene.

## Param

The background.

But trans to html is ok:

image

TypeDoc configuration

{
    "$schema": "https://typedoc.org/schema.json",
    "plugin": ["typedoc-plugin-markdown"],
    "entryPoints": ["./*.ts"],
    "out": "./docs"
}

Expected behavior

# Class: App

The application constructor.

## Param: param

The initial parameters.

## Param: param.container

The dom element to render scene.

## Param: param.background

The background.
tgreyuk commented 5 months ago

The comments need to be on the constructor (not the class):

Screenshot 2024-05-28 at 18 37 51
jiawei397 commented 5 months ago

The comments need to be on the constructor (not the class):

Screenshot 2024-05-28 at 18 37 51

Got it. Thanks.