@@ -503,37 +503,37 @@ export class DefaultTheme extends Theme {
503
503
}
504
504
505
505
function getReflectionClasses ( reflection : Reflection , filters : Record < string , boolean > ) {
506
- const classes : string [ ] = [ ] ;
506
+ const classes = new Set < string > ( ) ;
507
507
508
508
// Filter classes should match up with the settings function in
509
509
// partials/navigation.tsx.
510
510
for ( const key of Object . keys ( filters ) ) {
511
511
if ( key === "inherited" ) {
512
512
if ( reflection . flags . isInherited ) {
513
- classes . push ( "tsd-is-inherited" ) ;
513
+ classes . add ( "tsd-is-inherited" ) ;
514
514
}
515
515
} else if ( key === "protected" ) {
516
516
if ( reflection . flags . isProtected ) {
517
- classes . push ( "tsd-is-protected" ) ;
517
+ classes . add ( "tsd-is-protected" ) ;
518
518
}
519
519
} else if ( key === "private" ) {
520
520
if ( reflection . flags . isPrivate ) {
521
- classes . push ( "tsd-is-private" ) ;
521
+ classes . add ( "tsd-is-private" ) ;
522
522
}
523
523
} else if ( key === "external" ) {
524
524
if ( reflection . flags . isExternal ) {
525
- classes . push ( "tsd-is-external" ) ;
525
+ classes . add ( "tsd-is-external" ) ;
526
526
}
527
527
} else if ( key . startsWith ( "@" ) ) {
528
528
if ( key === "@deprecated" ) {
529
529
if ( reflection . isDeprecated ( ) ) {
530
- classes . push ( toStyleClass ( `tsd-is-${ key . substring ( 1 ) } ` ) ) ;
530
+ classes . add ( toStyleClass ( `tsd-is-${ key . substring ( 1 ) } ` ) ) ;
531
531
}
532
532
} else if (
533
533
reflection . comment ?. hasModifier ( key as `@${string } `) ||
534
534
reflection . comment ?. getTag ( key as `@${string } `)
535
535
) {
536
- classes . push ( toStyleClass ( `tsd-is-${ key . substring ( 1 ) } ` ) ) ;
536
+ classes . add ( toStyleClass ( `tsd-is-${ key . substring ( 1 ) } ` ) ) ;
537
537
} else if ( reflection . isDeclaration ( ) ) {
538
538
const ownSignatures = reflection . getNonIndexSignatures ( ) ;
539
539
// Check methods and accessors, find common tags, elevate
@@ -544,13 +544,13 @@ function getReflectionClasses(reflection: Reflection, filters: Record<string, bo
544
544
refl . comment ?. hasModifier ( key as `@${string } `) || refl . comment ?. getTag ( key as `@${string } `) ,
545
545
)
546
546
) {
547
- classes . push ( toStyleClass ( `tsd-is-${ key . substring ( 1 ) } ` ) ) ;
547
+ classes . add ( toStyleClass ( `tsd-is-${ key . substring ( 1 ) } ` ) ) ;
548
548
}
549
549
}
550
550
}
551
551
}
552
552
553
- return classes . join ( " " ) ;
553
+ return Array . from ( classes ) . join ( " " ) ;
554
554
}
555
555
556
556
function shouldShowCategories ( reflection : Reflection , opts : { includeCategories : boolean ; includeGroups : boolean } ) {
0 commit comments