MCPcopy
hub / github.com/angular/components / _decorateClassLikeDoc

Method _decorateClassLikeDoc

tools/dgeni/processors/categorizer.ts:78–103  ·  view source on GitHub ↗

* Decorates all class and interface docs inside of the dgeni pipeline. * - Members of a class and interface document will be extracted into separate variables.

(classLikeDoc: CategorizedClassLikeDoc)

Source from the content-addressed store, hash-verified

76 * - Members of a class and interface document will be extracted into separate variables.
77 */
78 private _decorateClassLikeDoc(classLikeDoc: CategorizedClassLikeDoc) {
79 // Resolve all methods and properties from the classDoc.
80 classLikeDoc.methods = classLikeDoc.members
81 .filter(isMethod)
82 .filter(filterDuplicateMembers) as CategorizedMethodMemberDoc[];
83
84 classLikeDoc.properties = classLikeDoc.members
85 .filter(isProperty)
86 .filter(filterDuplicateMembers) as CategorizedPropertyMemberDoc[];
87
88 // Special decorations for real class documents that don't apply for interfaces.
89 if (classLikeDoc.docType === 'class') {
90 this._decorateClassDoc(classLikeDoc as CategorizedClassDoc);
91 this._replaceMethodsWithOverload(classLikeDoc as CategorizedClassDoc);
92 }
93
94 // Call decorate hooks that can modify the method and property docs.
95 classLikeDoc.methods.forEach(doc => this._decorateMethodDoc(doc));
96 classLikeDoc.properties.forEach(doc => this._decoratePropertyDoc(doc));
97
98 decorateDeprecatedDoc(classLikeDoc);
99
100 // Sort members
101 classLikeDoc.methods.sort(sortCategorizedMethodMembers);
102 classLikeDoc.properties.sort(sortCategorizedPropertyMembers);
103 }
104
105 /**
106 * Decorates all Dgeni class documents for a simpler use inside of the template.

Callers 1

$processMethod · 0.95

Calls 7

_decorateClassDocMethod · 0.95
_decorateMethodDocMethod · 0.95
_decoratePropertyDocMethod · 0.95
decorateDeprecatedDocFunction · 0.90
sortMethod · 0.65
filterMethod · 0.45

Tested by

no test coverage detected