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

Method description not shown when methods use arrows #670

Closed xixixao closed 2 months ago

xixixao commented 3 months ago

What package is the bug related to?

typedoc-plugin-markdown

Describe the issue

Works:

export type SomeType = {
  /**
   * METHOD DESCRIPTION
   *
   * @returns RETURN DESCRIPTION
   */
  signIn(): string;
};

Doesn't work:

export type SomeType = {
  /**
   * METHOD DESCRIPTION
   *
   * @returns RETURN DESCRIPTION
   */
  signIn: () => string;
};

In my case I don't need the arrow syntax, so I have a workaround, but it seems like a bug.

I verified this is a bug in this plugin and not in typedoc.

TypeDoc configuration

Latest everything.

npx typedoc --plugin typedoc-plugin-markdown --entryPoints foo.ts --out ./docs

Expected behavior

No response

xixixao commented 3 months ago

Also btw it might be nice to give ppl some online playground (codepen or something) for easily sharing repros of issues.

xixixao commented 3 months ago

Actually I can't use the workaround, because that breaks type lints that check whether a method is bound or not.

tgreyuk commented 3 months ago

Fix in typedoc-plugin-markdown@4.2.5 .

Also btw it might be nice to give ppl some online playground (codepen or something) for easily sharing repros of issues.

Thanks - yes that is not a bad idea.

Artemeey commented 3 months ago

Fix in typedoc-plugin-markdown@4.2.5 .

Also btw it might be nice to give ppl some online playground (codepen or something) for easily sharing repros of issues.

Thanks - yes that is not a bad idea.

Thanks!

However method description in index files still not output

image

tgreyuk commented 3 months ago

@Artemeey thanks - this is now fixed in typedoc-plugin-markdown@4.2.6

Artemeey commented 2 months ago

@Artemeey thanks - this is now fixed in typedoc-plugin-markdown@4.2.6

It's work!

But not all of them, example:

/**
 * Info
 */
export const exampleWork = (): void => { }; // exists description in index

/**
 * Info
 * @return info
 */
export const exampleNoWork = (): void => { }; // no exists description in index
tgreyuk commented 2 months ago

But not all of them, example:

Ah - you are right - thanks. Will be fixed in next release.

tgreyuk commented 2 months ago

@Artemeey All issues should be resolved in Please try typedoc-plugin-markdown@4.2.7

Artemeey commented 2 months ago

@Artemeey All issues should be resolved in Please try typedoc-plugin-markdown@4.2.7

It works, thanks!