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]: declare statements are not preserved which breaks API extending for 3rd-party modules #794

Open
JounQin opened this issue Feb 24, 2025 · 3 comments
Labels
api-extractor @microsoft/api-extractor related issue

Comments

@JounQin
Copy link

JounQin commented Feb 24, 2025

Version

  System:
    OS: Linux 6.1 Debian GNU/Linux 11 (bullseye) 11 (bullseye)
    CPU: (2) x64 AMD EPYC
    Memory: 2.74 GB / 4.14 GB
    Container: Yes
    Shell: Unknown
  npmPackages:
    @rslib/core: ^0.5.1 => 0.5.1

Details

Input:

declare global {
  const x: string;
}

declare module "unist" {
  interface Data {
    key: string;
  }
}

export * from "./test";

Output:

export declare const y: string;

export { }

Reproduce link

https://codesandbox.io/p/devbox/thirsty-leftpad-h3fczd

Reproduce Steps

npm run build

@Timeless0911
Copy link
Contributor

No permission for this codesandbox.

@JounQin
Copy link
Author

JounQin commented Feb 25, 2025

No permission for this codesandbox.

Sorry, can you check now?

@Timeless0911
Copy link
Contributor

Timeless0911 commented Feb 25, 2025

Should be an issue of @microsoft/api-extractor, see microsoft/rushstack#2090 and microsoft/rushstack#3000

@Timeless0911 Timeless0911 added the api-extractor @microsoft/api-extractor related issue label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-extractor @microsoft/api-extractor related issue
Projects
None yet
Development

No branches or pull requests

2 participants