Skip to content

Incorrect join in type.reflection.function? #793

@LekoArts

Description

@LekoArts

What package is the bug related to?

typedoc-plugin-markdown

Describe the issue

Hello!

In my project I'm seeing a problem with the function https://github.com/typedoc2md/typedoc-plugin-markdown/blob/a3fa1c89ed03fb121460e4355b49b3965c8b986a/packages/typedoc-plugin-markdown/src/theme/context/partials/type.reflection.function.ts, more specifically with its join.('') at the end.

I created this reproduction: https://github.com/lekoarts-demos/typedoc-plugin-markdown-scratchpad/tree/type-reflection-function/issues/tbd

In https://github.com/lekoarts-demos/typedoc-plugin-markdown-scratchpad/blob/type-reflection-function/issues/tbd/docs/functions/useExample.md you can see that the type is:

(`options`?) => `Promise`\<`void`\>(`signOutCallback`?, `options`?) => `Promise`\<`void`\>

TypeDoc configuration

No response

Expected behavior

(`options`?) => `Promise`\<`void`\> \| (`signOutCallback`?, `options`?) => `Promise`\<`void`\>

I'd expect a join(' | ') here. Is there a weird edge case I'm not considering? Or does it change its behavior if it's not set to 'table'?

Anyways, before putting up a PR I wanted to ask if this is expected behavior or a bug 👍

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