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 declaration exports two times #352

Closed
3 tasks done
momokunsu opened this issue Jul 21, 2024 · 3 comments
Closed
3 tasks done

namespace declaration exports two times #352

momokunsu opened this issue Jul 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@momokunsu
Copy link

Describe the bug

source code:

export namespace Space {
    export let test = "test";
}

exports .d.ts file:

export declare namespace Space {
    let test: string;
}

export { }

export declare namespace Space {
    let test: string;
}

namespace Space has 2 declaration.

this bug also replicate in Reproduction url

Reproduction

https://stackblitz.com/edit/stackblitz-starters-7ejfqm?file=index.ts

Steps to reproduce

No response

System Info

nodejs

Validations

@qmhc
Copy link
Owner

qmhc commented Jul 23, 2024

It seems a bug form api-extractor, see microsoft/rushstack#4807.

@momokunsu
Copy link
Author

It seems a bug form api-extractor, see microsoft/rushstack#4807.

It seems that 2 problems, his project makes two packages, and everyone exports one time from the same package names 'package-a'.But my repo just has a single file. Moreover, his result is correct even if that isn't expected. My result has syntax errors of typescript because of redefine namespace members.

@momokunsu
Copy link
Author

I changed this plugin version to 3.7.3, and it works. I hope to help you find the real bug.

@qmhc qmhc added the bug Something isn't working label Jul 23, 2024
@qmhc qmhc closed this as completed in b9c3947 Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants