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

[BUG] Declaration Merging not working/supported #1450

Open
reey opened this issue Mar 28, 2024 · 0 comments
Open

[BUG] Declaration Merging not working/supported #1450

reey opened this issue Mar 28, 2024 · 0 comments
Assignees
Milestone

Comments

@reey
Copy link

reey commented Mar 28, 2024

Overview of the issue

Declaration Merging is not working.
Not sure if this should be considered as a bug or feature request.
If I e.g. create two interfaces with the same name:

export interface SpecificExtensionKeys {
  test1: string;
}

export interface SpecificExtensionKeys {
  test2: string;
}

I would actually expect something like:

export interface SpecificExtensionKeys {
  test1: string;
  test2: string;
}

To get documented. Instead of that I'm getting the two interfaces separately documented.

This should e.g. also work in case of global namespaces. Using the same global namespace in two locations:

declare global {
  namespace SomeTestNamespace {
    interface SpecificExtensionKeys {
      test1: string;
    }
  }
}

declare global {
  namespace SomeTestNamespace {
    interface SpecificExtensionKeys {
      test2: string;
    }
  }
}
Operating System, Node.js, npm, compodoc version(s)

OS: Windows 10
Node.js: v18.18.2
npm: 9.8.1
compodoc: 1.1.23

Angular configuration, a package.json file in the root folder

does not appy.

Compodoc installed globally or locally ?

locally

If possible sourcecode of the file where it breaks

does not appy.

If possible your terminal logs before the error

does not appy.

Motivation for or Use Case

Allows to define global interfaces across sub entry points. That can also be extended by the library consumer.

Reproduce the error

described in the overview.

Related issues
Suggest a Fix
@reey reey added the Type: Bug label Mar 28, 2024
@vogloblinsky vogloblinsky added this to the 1.2.0 milestone Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants