rushstack
rushstack copied to clipboard
[api-extractor]: Interface extension members not appearing in generated documentation due to missing exports
Summary
I was trying to document TypeScript interfaces that extend other interfaces to compose behavior. I created interfaces that extend other interfaces (e.g., InterfaceC extends InterfaceA, InterfaceB) and expected API Extractor to merge all members from the extended interfaces into the final documentation. However, the generated documentation shows empty interfaces with no members, and API Extractor generates "forgotten export" warnings for the base interfaces that are referenced but not exported.
Repro steps
- Create interfaces that extend other interfaces:
interface InterfaceA {
methodA(): void;
}
interface InterfaceB {
methodB(): void;
}
export interface InterfaceC extends InterfaceA, InterfaceB {
}
- Run
api-extractor runto generate API model - Run
api-documenter markdownto generate documentation
Expected result: The InterfaceC interface documentation should show all members: methodA() and methodB()
Actual result: The InterfaceC interface documentation shows no members, and API Extractor generates warnings: