[api-extractor] Re-exported import *
namespaces produce malformed .d.ts rollups (with bundledPackages
)
#4807
Labels
bug
Something isn't working as intended
effort: medium
Needs a somewhat experienced developer
help wanted
If you're looking to contribute, this issue is a good place to start!
repro confirmed
The issue comments included repro instructions, and the maintainers reproduced the problem
Summary
See this repo for a repro of the issue: https://github.com/Josmithr/api-extractor-playground/tree/re-export-module-namespace
The repo contains 2 packages,
package-a
andpackage-b
.package-b
depends onpackage-a
, and both are configured with API-Extractor.In this scenario,
package-a
contains a single root export, which is a "namespace" generated via:package-a/src/index.ts
It's type rollup, generated by API-Extractor looks like this:
package-a/dist/rollup.d.ts
package-b
also contains a single root export, which is simply a re-export of namespaceA
frompackage-a
.It is also configured with
package-a
specified in itsbundledPackages
.Its export looks like this:
package-b/src/index.ts
I would expect
package-b
's type roll-up to look identical to that ofpackage-a
, but instead, a malformed rollup is generated:package-b/dist/rollup.d.ts with
bundledPackages
package-b/dist/rollup.d.ts WITHOUT
bundledPackages
Notice that the necessary imports are missing for
Foo
,bar
, andBaz
.Standard questions
Please answer these questions to help us investigate your issue more quickly:
@microsoft/api-extractor
version?node -v
)?The text was updated successfully, but these errors were encountered: