Skip to content

[Bug]: declare statements are not preserved which breaks API extending for 3rd-party modules #794

Description

@JounQin

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-extractor@microsoft/api-extractor related issue

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions