@@ -148,6 +148,9 @@ export class CommentPlugin extends ConverterComponent {
148148 @Option ( "defaultCategory" )
149149 accessor defaultCategory ! : string ;
150150
151+ @Option ( "suppressCommentWarningsInDeclarationFiles" )
152+ accessor suppressCommentWarningsInDeclarationFiles ! : boolean ;
153+
151154 private _excludeKinds : number | undefined ;
152155 private get excludeNotDocumentedKinds ( ) : number {
153156 this . _excludeKinds ??= this . application . options
@@ -406,7 +409,8 @@ export class CommentPlugin extends ConverterComponent {
406409 if ( reflection . comment ) {
407410 if (
408411 reflection . comment . label &&
409- ! / [ A - Z _ ] [ A - Z 0 - 9 _ ] / . test ( reflection . comment . label )
412+ ! / [ A - Z _ ] [ A - Z 0 - 9 _ ] / . test ( reflection . comment . label ) &&
413+ ! this . suppressCommentWarnings ( reflection . comment )
410414 ) {
411415 context . logger . warn (
412416 i18n . label_0_for_1_cannot_be_referenced (
@@ -421,7 +425,7 @@ export class CommentPlugin extends ConverterComponent {
421425 group ,
422426 reflection . comment . modifierTags ,
423427 ) ;
424- if ( intersect . size > 1 ) {
428+ if ( intersect . size > 1 && ! this . suppressCommentWarnings ( reflection . comment ) ) {
425429 const [ a , b ] = intersect ;
426430 context . logger . warn (
427431 i18n . modifier_tag_0_is_mutually_exclusive_with_1_in_comment_for_2 (
@@ -724,7 +728,7 @@ export class CommentPlugin extends ConverterComponent {
724728
725729 moveNestedParamTags ( /* in-out */ paramTags , params , comment . sourcePath ) ;
726730
727- if ( ! comment . inheritedFromParentDeclaration ) {
731+ if ( ! comment . inheritedFromParentDeclaration && ! this . suppressCommentWarnings ( comment ) ) {
728732 for ( const tag of paramTags ) {
729733 this . application . logger . warn (
730734 i18n . signature_0_has_unused_param_with_name_1 (
@@ -735,6 +739,11 @@ export class CommentPlugin extends ConverterComponent {
735739 }
736740 }
737741 }
742+
743+ private suppressCommentWarnings ( comment : Comment ) {
744+ return this . suppressCommentWarningsInDeclarationFiles &&
745+ / \. d \. ( t s | m t s | c t s ) $ / . test ( comment . sourcePath || "" ) ;
746+ }
738747}
739748
740749function inTypeLiteral ( refl : Reflection | undefined ) {
0 commit comments