File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
19
19
isProperty ,
20
20
isService
21
21
} from '../common/decorators' ;
22
+ import { ClassLikeExportDoc } from 'dgeni-packages/typescript/api-doc-types/ClassLikeExportDoc' ;
22
23
import { MethodMemberDoc } from 'dgeni-packages/typescript/api-doc-types/MethodMemberDoc' ;
23
24
import { sortCategorizedMembers } from '../common/sort-members' ;
24
25
@@ -31,6 +32,7 @@ export interface CategorizedClassDoc extends ClassExportDoc {
31
32
isDeprecated : boolean ;
32
33
directiveExportAs ?: string | null ;
33
34
directiveSelectors ?: string [ ] ;
35
+ extendedDocs : ClassLikeExportDoc [ ] ;
34
36
}
35
37
36
38
export interface CategorizedPropertyMemberDoc extends PropertyMemberDoc {
@@ -88,6 +90,12 @@ export class Categorizer implements Processor {
88
90
classDoc . methods . sort ( sortCategorizedMembers ) ;
89
91
classDoc . properties . sort ( sortCategorizedMembers ) ;
90
92
93
+ // Filter the extends clauses for clauses with an associated Dgeni document. Clauses without
94
+ // a document are unknown and should not be mentioned in the documentation for this class.
95
+ classDoc . extendedDocs = classDoc . extendsClauses
96
+ . filter ( clause => clause . doc )
97
+ . map ( clause => clause . doc ! ) ;
98
+
91
99
// Categorize the current visited classDoc into its Angular type.
92
100
if ( isDirective ( classDoc ) ) {
93
101
classDoc . isDirective = true ;
Original file line number Diff line number Diff line change @@ -6,6 +6,15 @@ <h4 class="docs-api-h4 docs-api-class-name">
6
6
< p class ="docs-api-class-description "> {$ class.description | safe $}</ p >
7
7
{%- endif -%}
8
8
9
+ {% if class.extendedDocs.length %}
10
+ < p class ="docs-api-class-extends-clauses ">
11
+ < span class ="docs-api-class-extends-label "> Extends:</ span >
12
+ {% for extendedDoc in class.extendedDocs %}
13
+ < span class ="docs-api-class-extends-type "> {$ extendedDoc.name $}</ span >
14
+ {% endfor %}
15
+ </ p >
16
+ {% endif %}
17
+
9
18
{%- if class.directiveSelectors -%}
10
19
< p class ="docs-api-directive-selectors ">
11
20
< span class ="docs-api-class-selector-label "> Selector:</ span >
You can’t perform that action at this time.
0 commit comments