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

Comments in re-export erases documentation #1886

Closed
DavidPeicho opened this issue Mar 16, 2022 · 3 comments
Closed

Comments in re-export erases documentation #1886

DavidPeicho opened this issue Mar 16, 2022 · 3 comments
Labels
bug Functionality does not match expectation no bug This is expected behavior

Comments

@DavidPeicho
Copy link

Search terms

missing, erase, comments

Expected Behavior

Consider the following file:

query.ts

/*
 * This query is awesome!
 *
 * @category Query
 */
export class Query { }

index.ts

/**
 * This comment will erase the Query doc, ho snap! :(
 */

export * from './query.ts'

The documentation that will be generated for the Query class should be This query is awesome!

Actual Behavior

The documentation that appears is the one from the comment before the re-export: This comment will erase the Query doc, ho snap! :(

Steps to reproduce the bug

It's easy to reproduce with the exact two same files I gave in the Expected Behavior section.

Environment

  • Typedoc version: 0.22.13
  • TypeScript version: 4.6.2
  • Node.js version: 17.2.0
  • OS: Windows WSL
@DavidPeicho DavidPeicho added the bug Functionality does not match expectation label Mar 16, 2022
@DavidPeicho
Copy link
Author

I am not 100% sure it's a bug, but it's something I discovered today. I agree I maybe shouldn't use those type of comments before my re-export, but it still seems to be an odd behavior to me?

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 17, 2022

This is intentional, but apparently never got added to the docs, and only shows up in the change log if you know what to search for: #1504

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 14, 2022

In 0.23, the behavior here is changing again, comments on exports will be applied only for namespaces/modules, so classes, functions, variables, and type aliases will not be affected by this.

@Gerrit0 Gerrit0 closed this as completed Apr 17, 2022
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 no bug This is expected behavior
Projects
None yet
Development

No branches or pull requests

2 participants