File tree Expand file tree Collapse file tree 4 files changed +30
-1
lines changed Expand file tree Collapse file tree 4 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 4
4
5
5
- Readme files within monorepos now have ` @link ` tags resolved, #2029 .
6
6
- Correctly resolve unqualified links to class members within parameters, #2031 .
7
+ - TypeDoc will now consider other reflections with the same name as parents when resolving links, #2033 .
7
8
8
9
## v0.23.10 (2022-07-31)
9
10
Original file line number Diff line number Diff line change @@ -55,7 +55,15 @@ export function resolveDeclarationReference(
55
55
) {
56
56
high . push ( reflection . parent ! . parent ! ) ;
57
57
} else if ( high [ 0 ] !== reflection ) {
58
- high . push ( reflection ) ;
58
+ if ( reflection . parent instanceof ContainerReflection ) {
59
+ high . push (
60
+ ...( reflection . parent . children ?. filter (
61
+ ( c ) => c . name === reflection . name
62
+ ) || [ ] )
63
+ ) ;
64
+ } else {
65
+ high . push ( reflection ) ;
66
+ }
59
67
}
60
68
}
61
69
Original file line number Diff line number Diff line change
1
+ export namespace Foo {
2
+ export interface Bar { }
3
+ }
4
+
5
+ /** {@link Bar } */
6
+ export class Foo { }
Original file line number Diff line number Diff line change @@ -726,4 +726,18 @@ export const issueTests: {
726
726
logger . discardDebugMessages ( ) ;
727
727
logger . expectNoOtherMessages ( ) ;
728
728
} ,
729
+
730
+ gh2033 ( project , logger ) {
731
+ const cls = project . children ! . find (
732
+ ( c ) => c . name === "Foo" && c . kind === ReflectionKind . Class
733
+ ) ;
734
+ ok ( cls ) ;
735
+
736
+ const link = cls . comment ?. summary [ 0 ] ;
737
+ ok ( link ?. kind === "inline-tag" ) ;
738
+ ok ( link . target ) ;
739
+
740
+ logger . discardDebugMessages ( ) ;
741
+ logger . expectNoOtherMessages ( ) ;
742
+ } ,
729
743
} ;
You can’t perform that action at this time.
0 commit comments