rushstack
rushstack copied to clipboard
[api-extractor] Re-exported namespace members not included in the report
Is this a feature or a bug?
- [ ] Feature
- [X] Bug
Please describe the actual behavior.
Consider the following entrypoint implementation:
import * as _auth from './auth/auth';
export namespace auth {
export import Auth = _auth.Auth;
export import UserRecord = _auth.UserRecord;
}
Note that the auth
namespace re-exports several types from another module. I expect definitions of Auth
and UserRecord
to be included in the generated API report. But this is all I get:
// @public (undocumented)
export namespace auth {
import Auth = _auth.Auth;
import UserRecord = _auth.UserRecord;
}
// (No @packageDocumentation comment for this package)
If this is a bug, please provide the tool version, Node.js version, and OS.
- Tool: API Extractor
- Tool Version: v7.9.11
- Node Version: v10.22.0
- OS: Mac OS
Seeing the same problem with symbol re-exports from inside a namespace.
Input:
import { credential } from './credential';
export namespace admin {
export { credential }
}
Generated report:
// @public (undocumented)
export namespace admin {
{ credential }
}
// (No @packageDocumentation comment for this package)
Hi, is this a known limitation, not considered best practice?
hmm I guess one can omit the export namespace
and just declare it?
`
Hi, is this a known limitation, not considered best practice?
hmm I guess one can omit the
export namespace
and just declare it?
api-exporter
would then omit un-exported namespaces from the final API report / d.ts bundle