Closed
Description
Search terms
default export, named export, reference
Expected Behavior
If the same thing (e.g. class, function) is exported in an entrypoint through both the default export and a named export, I'd expect the generated documentation to look the same regardless of which export has been defined first.
Preferably, if the same thing is exported in both the default and the named export, the default export should contain references to the named export, not the other way around.
Actual Behavior
TypeDoc will produce different documentation pages based on whether the default export is placed before or after the named export.
For the following code:
import { SomeClass } from "./someClass";
export default SomeClass;
export { SomeClass };
TypeDoc outputs:
while for this one:
import { SomeClass } from "./someClass";
export { SomeClass };
export default SomeClass;
it shows:
Steps to reproduce the bug
- Clone the reproduction repository.
npm ci
npm run docs
- This will generate two documentation directories:
docs-default-first
, generated usingdefaultFirst.ts
as the sole entrypoint,docs-default-last
, generated usingdefaultLast.ts
as the sole entrypoint.
Environment
- Typedoc version: 0.22.8
- TypeScript version: 4.4.4
- Node.js version: 14.15.4
- OS: Windows 10
Metadata
Metadata
Assignees
Labels
No labels