Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown @-annotations are ignored for function type aliases #1734

Closed
nex3 opened this issue Oct 7, 2021 · 1 comment
Closed

Unknown @-annotations are ignored for function type aliases #1734

nex3 opened this issue Oct 7, 2021 · 1 comment
Labels
bug Functionality does not match expectation

Comments

@nex3
Copy link

nex3 commented Oct 7, 2021

Expected Behavior

I would expect unknown @-annotations to show up in the documentation the way they do for other types, like so:

image

This is particularly useful for writing annotations that are meant to be compatible with TSDoc, like @example.

Actual Behavior

If I write an unknown @-annotation on a type alias whose value is a function:

/**
 * @asdf Some example text
 */
export type Foo = (arg: string) => string;

It doesn't appear in the output:

image

Steps to reproduce the bug

Just run npx typedoc test.ts on the above code.

Environment

  • Typedoc version: 0.22.4
  • TypeScript version: 4.3.5
  • Node.js version: 16.10.0
  • OS: Linux
@nex3 nex3 added the bug Functionality does not match expectation label Oct 7, 2021
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Oct 10, 2021

Oops... that's an easy fix at least. Apparently I didn't realize that Comment always has the tags property, even if there are no tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

2 participants