File tree Expand file tree Collapse file tree 6 files changed +33
-0
lines changed
internationalization/locales Expand file tree Collapse file tree 6 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ title: Changelog
7
7
### Bug Fixes
8
8
9
9
- Fixed bug introduced in 0.28.8 where TypeDoc could not render docs with some mixin classes, #3007 .
10
+ - ` @inheritDoc ` will now correctly overwrite ` @remarks ` and ` @returns ` blocks on the target comment, #3012 .
10
11
11
12
## v0.28.12 (2025-09-01)
12
13
Original file line number Diff line number Diff line change @@ -346,6 +346,13 @@ function postProcessComment(
346
346
) ,
347
347
) ;
348
348
}
349
+ if ( ( inlineInheritDoc . length || inheritDoc . length ) && returns . length ) {
350
+ warning (
351
+ i18n . content_in_returns_block_overwritten_by_inheritdoc_in_comment_at_0 (
352
+ getPosition ( ) ,
353
+ ) ,
354
+ ) ;
355
+ }
349
356
}
350
357
351
358
const aliasedTags = new Map ( [ [ "@return" , "@returns" ] ] ) ;
Original file line number Diff line number Diff line change @@ -150,6 +150,8 @@ export class InheritDocPlugin extends ConverterComponent {
150
150
}
151
151
152
152
target . comment . removeTags ( "@inheritDoc" ) ;
153
+ target . comment . removeTags ( "@remarks" ) ;
154
+ target . comment . removeTags ( "@returns" ) ;
153
155
target . comment . summary = Comment . cloneDisplayParts (
154
156
source . comment . summary ,
155
157
) ;
Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ export = {
81
81
"Content in the summary section will be overwritten by the @inheritDoc tag in comment at {0}" ,
82
82
content_in_remarks_block_overwritten_by_inheritdoc_in_comment_at_0 :
83
83
"Content in the @remarks block will be overwritten by the @inheritDoc tag in comment at {0}" ,
84
+ content_in_returns_block_overwritten_by_inheritdoc_in_comment_at_0 :
85
+ "Content in the @returns block will be overwritten by the @inheritDoc tag in comment at {0}" ,
84
86
example_tag_literal_name :
85
87
"The first line of an example tag will be taken literally as the example name, and should only contain text" ,
86
88
inheritdoc_tag_properly_capitalized : "The @inheritDoc tag should be properly capitalized" ,
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @remarks DictRemarks
3
+ */
4
+ export const DictionarySchema = { } ;
5
+
6
+ /**
7
+ * {@inheritDoc DictionarySchema }
8
+ *
9
+ * @remarks
10
+ * Alias of {@link DictionarySchema}
11
+ */
12
+ export const NullProtoObjectSchema = DictionarySchema ;
Original file line number Diff line number Diff line change @@ -2182,4 +2182,13 @@ describe("Issue Tests", () => {
2182
2182
ok ( x . comment . summary [ 1 ] . target ) ;
2183
2183
ok ( project . files . resolve ( x . comment . summary [ 1 ] . target , project ) === doc ) ;
2184
2184
} ) ;
2185
+
2186
+ it ( "#3012 removes @remarks from inheriting comment" , ( ) => {
2187
+ const project = convert ( ) ;
2188
+ const nullProto = query ( project , "NullProtoObjectSchema" ) ;
2189
+ equal ( nullProto . comment ?. blockTags . map ( t => t . tag ) , [ "@remarks" ] ) ;
2190
+ equal ( nullProto . comment ?. blockTags . map ( t => Comment . combineDisplayParts ( t . content ) ) , [ "DictRemarks" ] ) ;
2191
+
2192
+ logger . expectMessage ( "warn: Content in the @remarks block will be overwritten*" ) ;
2193
+ } ) ;
2185
2194
} ) ;
You can’t perform that action at this time.
0 commit comments