rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[api-extractor]: Interface extension members not appearing in generated documentation due to missing exports

Open ritz078 opened this issue 6 months ago • 0 comments

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

  1. Create interfaces that extend other interfaces:
interface InterfaceA {
  methodA(): void;
}

interface InterfaceB {
  methodB(): void;
}

export interface InterfaceC extends InterfaceA, InterfaceB {
}
  1. Run api-extractor run to generate API model
  2. Run api-documenter markdown to 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:

ritz078 avatar Aug 14 '25 14:08 ritz078