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
77### Bug Fixes
88
99- 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 .
1011
1112## v0.28.12 (2025-09-01)
1213
Original file line number Diff line number Diff line change @@ -346,6 +346,13 @@ function postProcessComment(
346346 ) ,
347347 ) ;
348348 }
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+ }
349356}
350357
351358const aliasedTags = new Map ( [ [ "@return" , "@returns" ] ] ) ;
Original file line number Diff line number Diff line change @@ -150,6 +150,8 @@ export class InheritDocPlugin extends ConverterComponent {
150150 }
151151
152152 target . comment . removeTags ( "@inheritDoc" ) ;
153+ target . comment . removeTags ( "@remarks" ) ;
154+ target . comment . removeTags ( "@returns" ) ;
153155 target . comment . summary = Comment . cloneDisplayParts (
154156 source . comment . summary ,
155157 ) ;
Original file line number Diff line number Diff line change @@ -81,6 +81,8 @@ export = {
8181 "Content in the summary section will be overwritten by the @inheritDoc tag in comment at {0}" ,
8282 content_in_remarks_block_overwritten_by_inheritdoc_in_comment_at_0 :
8383 "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}" ,
8486 example_tag_literal_name :
8587 "The first line of an example tag will be taken literally as the example name, and should only contain text" ,
8688 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", () => {
21822182 ok ( x . comment . summary [ 1 ] . target ) ;
21832183 ok ( project . files . resolve ( x . comment . summary [ 1 ] . target , project ) === doc ) ;
21842184 } ) ;
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+ } ) ;
21852194} ) ;
You can’t perform that action at this time.
0 commit comments