diff --git a/apps/api-extractor/src/generators/DtsRollupGenerator.ts b/apps/api-extractor/src/generators/DtsRollupGenerator.ts index 2f845040a94..2de36342800 100644 --- a/apps/api-extractor/src/generators/DtsRollupGenerator.ts +++ b/apps/api-extractor/src/generators/DtsRollupGenerator.ts @@ -105,7 +105,10 @@ export class DtsRollupGenerator { // Emit the imports for (const entity of collector.entities) { if (entity.astEntity instanceof AstImport) { - // BUG MITIGATION: don't trim imports based on their release tags + // Note: it isn't valid to trim imports based on their release tags. + // E.g. class Foo (`@public`) extends interface Bar (`@beta`) from some external library. + // API-Extractor cannot trim `import { Bar } from "externa-library"` when generating its public rollup, + // or the export of `Foo` would include a broken reference to `Bar`. const astImport: AstImport = entity.astEntity; DtsEmitHelpers.emitImport(writer, entity, astImport); }