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 44
55- Readme files within monorepos now have ` @link ` tags resolved, #2029 .
66- 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 .
78
89## v0.23.10 (2022-07-31)
910
Original file line number Diff line number Diff line change @@ -55,7 +55,15 @@ export function resolveDeclarationReference(
5555 ) {
5656 high . push ( reflection . parent ! . parent ! ) ;
5757 } 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+ }
5967 }
6068 }
6169
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: {
726726 logger . discardDebugMessages ( ) ;
727727 logger . expectNoOtherMessages ( ) ;
728728 } ,
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+ } ,
729743} ;
You can’t perform that action at this time.
0 commit comments