@@ -26,6 +26,7 @@ import { ConverterComponent } from "../components.js";
2626import type { Context } from "../context.js" ;
2727import { ConverterEvents } from "../converter-events.js" ;
2828import type { Converter } from "../converter.js" ;
29+ import { CategoryPlugin } from "./CategoryPlugin.js" ;
2930
3031/**
3132 * These tags are not useful to display in the generated documentation.
@@ -137,6 +138,9 @@ export class CommentPlugin extends ConverterComponent {
137138 @Option ( "excludeNotDocumented" )
138139 accessor excludeNotDocumented ! : boolean ;
139140
141+ @Option ( "excludeCategories" )
142+ accessor excludeCategories ! : string [ ] ;
143+
140144 @Option ( "defaultCategory" )
141145 accessor defaultCategory ! : string ;
142146
@@ -566,6 +570,10 @@ export class CommentPlugin extends ConverterComponent {
566570 return true ;
567571 }
568572
573+ if ( this . excludedByCategory ( reflection ) ) {
574+ return true ;
575+ }
576+
569577 if (
570578 reflection . kindOf (
571579 ReflectionKind . ConstructorSignature |
@@ -649,6 +657,22 @@ export class CommentPlugin extends ConverterComponent {
649657 return isHidden ;
650658 }
651659
660+ private excludedByCategory ( reflection : Reflection ) : boolean {
661+ const excludeCategories = this . excludeCategories ;
662+ let target : DeclarationReflection | undefined ;
663+ if ( reflection instanceof DeclarationReflection ) {
664+ target = reflection ;
665+ } else if ( reflection instanceof SignatureReflection ) {
666+ target = reflection . parent ;
667+ }
668+ if ( ! target || ! excludeCategories . length ) return false ;
669+ const categories = CategoryPlugin . getCategories ( target ) ;
670+ if ( categories . size === 0 ) {
671+ categories . add ( this . defaultCategory ) ;
672+ }
673+ return excludeCategories . some ( ( cat ) => categories . has ( cat ) ) ;
674+ }
675+
652676 private validateParamTags (
653677 signature : SignatureReflection ,
654678 comment : Comment ,
0 commit comments