@@ -99,7 +99,7 @@ export class DefaultTheme extends Theme {
99
99
return this . getRenderContext ( pageEvent ) . defaultLayout ( template , pageEvent ) ;
100
100
} ;
101
101
102
- getReflectionClasses ( reflection : DeclarationReflection | DocumentReflection ) {
102
+ getReflectionClasses ( reflection : Reflection ) {
103
103
const filters = this . application . options . getValue ( "visibilityFilters" ) as Record < string , boolean > ;
104
104
return getReflectionClasses ( reflection , filters ) ;
105
105
}
@@ -502,10 +502,7 @@ export class DefaultTheme extends Theme {
502
502
}
503
503
}
504
504
505
- function getReflectionClasses (
506
- reflection : DeclarationReflection | DocumentReflection ,
507
- filters : Record < string , boolean > ,
508
- ) {
505
+ function getReflectionClasses ( reflection : Reflection , filters : Record < string , boolean > ) {
509
506
const classes : string [ ] = [ ] ;
510
507
511
508
// Filter classes should match up with the settings function in
@@ -537,6 +534,18 @@ function getReflectionClasses(
537
534
reflection . comment ?. getTag ( key as `@${string } `)
538
535
) {
539
536
classes . push ( toStyleClass ( `tsd-is-${ key . substring ( 1 ) } ` ) ) ;
537
+ } else if ( reflection . isDeclaration ( ) ) {
538
+ const ownSignatures = reflection . getNonIndexSignatures ( ) ;
539
+ // Check methods and accessors, find common tags, elevate
540
+ if (
541
+ ownSignatures . length &&
542
+ ownSignatures . every (
543
+ ( refl ) =>
544
+ refl . comment ?. hasModifier ( key as `@${string } `) || refl . comment ?. getTag ( key as `@${string } `) ,
545
+ )
546
+ ) {
547
+ classes . push ( toStyleClass ( `tsd-is-${ key . substring ( 1 ) } ` ) ) ;
548
+ }
540
549
}
541
550
}
542
551
}
0 commit comments