Skip to content

Commit fa2a322

Browse files
committed
Include classes from other packages in class hierarchy
Resolves #2467
1 parent 5d279c3 commit fa2a322

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ title: Changelog
66

77
### Bug Fixes
88

9+
- Include classes which inherit from another package in class hierarchy in packages mode, #2467.
10+
- Fixed handling of `@categoryDescription` and `@groupDescription` on module pages, #2787.
911
- Fixed automatic discovery of entry points in packages mode.
1012
- Reverted accidental style change for hierarchy page introduced in 0.27.0
1113
- The hierarchy Expand/Collapse link will now only appear if the hierarchies are different.
12-
- Fixed handling of `@categoryDescription` and `@groupDescription` on module pages, #2787.
1314

1415
## v0.27.0 (2024-11-27)
1516

src/lib/converter/plugins/TypePlugin.ts

+16-13
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ export class TypePlugin extends ConverterComponent {
2626
this.onResolveEnd.bind(this),
2727
);
2828
this.owner.on(ConverterEvents.END, () => this.reflections.clear());
29-
this.application.on(ApplicationEvents.REVIVE, this.onRevive.bind(this));
29+
this.application.on(
30+
ApplicationEvents.REVIVE,
31+
this.onRevive.bind(this),
32+
100,
33+
);
3034
}
3135

3236
private onRevive(project: ProjectReflection) {
3337
for (const id in project.reflections) {
34-
this.resolve(
35-
project,
36-
project.reflections[id],
37-
/* create links */ false,
38-
);
38+
this.resolve(project, project.reflections[id]);
3939
}
4040
this.finishResolve(project);
4141
this.reflections.clear();
@@ -45,11 +45,7 @@ export class TypePlugin extends ConverterComponent {
4545
this.resolve(context.project, reflection);
4646
}
4747

48-
private resolve(
49-
project: ProjectReflection,
50-
reflection: Reflection,
51-
createLinks = true,
52-
) {
48+
private resolve(project: ProjectReflection, reflection: Reflection) {
5349
if (!(reflection instanceof DeclarationReflection)) return;
5450

5551
if (reflection.kindOf(ReflectionKind.ClassOrInterface)) {
@@ -58,7 +54,12 @@ export class TypePlugin extends ConverterComponent {
5854
walk(reflection.implementedTypes, (target) => {
5955
this.postpone(target);
6056
target.implementedBy ||= [];
61-
if (createLinks) {
57+
58+
if (
59+
!target.implementedBy.some(
60+
(t) => t.reflection === reflection,
61+
)
62+
) {
6263
target.implementedBy.push(
6364
ReferenceType.createResolvedReference(
6465
reflection.name,
@@ -73,7 +74,9 @@ export class TypePlugin extends ConverterComponent {
7374
this.postpone(target);
7475
target.extendedBy ||= [];
7576

76-
if (createLinks) {
77+
if (
78+
!target.extendedBy.some((t) => t.reflection === reflection)
79+
) {
7780
target.extendedBy.push(
7881
ReferenceType.createResolvedReference(
7982
reflection.name,

0 commit comments

Comments
 (0)