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

@namespace creates duplicated namespace in doc #2364

Closed
jpolo opened this issue Aug 11, 2023 · 3 comments
Closed

@namespace creates duplicated namespace in doc #2364

jpolo opened this issue Aug 11, 2023 · 3 comments
Labels
bug Functionality does not match expectation

Comments

@jpolo
Copy link

jpolo commented Aug 11, 2023

Search terms

Expected Behavior

Typedoc should generate one namespace entry

Actual Behavior

Typedoc generates two entries

Steps to reproduce the bug

export namespace NS {
  export type T = string;
}
/**
 * @namespace
 */
export const NS = {
  property: 'blah',
};

=> namespace NS with only T in it
=> namespace NS with property in it

I also found a related bug

export type NS  = { foo: string };

/**
 * @namespace
 */
export const NS = {
  property: 'blah',
};

=> This will create a Namespace named NS, with a foo property in it.
=> It seems @namespace is ignored

Environment

  • Typedoc version: 0.24.8
  • TypeScript version: 5.1.6
  • Node.js version: v18.17.1
  • OS: macOS
@jpolo jpolo added the bug Functionality does not match expectation label Aug 11, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 11, 2023

Declaration merging is really annoying and full of weird edge cases...

The second example seems to be working as intended to me. TypeDoc creates a namespace + a type, as expected.

@jpolo
Copy link
Author

jpolo commented Aug 13, 2023

Declaration merging is really annoying and full of weird edge cases...

The second example seems to be working as intended to me. TypeDoc creates a namespace + a type, as expected.

It creates the type and the namespace but the content of the namespace is wrongly generated.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 13, 2023

Well, that's weird... I saw there was one property, didn't notice the name was wrong!

Gerrit0 added a commit that referenced this issue Aug 13, 2023
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