tools/dgeni/processors/categorizer.js
function decorateClassDoc(classDoc) {
    // Resolve all methods and properties from the classDoc. Includes inherited docs.
    classDoc.methods = resolveMethods(classDoc);
    classDoc.properties = resolveProperties(classDoc);

    // Call decorate hooks that can modify the method and property docs.
    classDoc.methods.forEach(doc => decorateMethodDoc(doc));
    classDoc.properties.forEach(doc => decoratePropertyDoc(doc));

    // Categorize the current visited classDoc into its Angular type.
    if (isDirective(classDoc)) {
      classDoc.isDirective = true;
      classDoc.directiveExportAs = getDirectiveExportAs(classDoc);
    } else if (isService(classDoc)) {
      classDoc.isService = true;
    } else if (isNgModule(classDoc)) {
      classDoc.isNgModule = true;
    }
  }
function decorateClassDoc(classDoc) {
    // Resolve all methods and properties from the classDoc. Includes inherited docs.
    classDoc.methods = resolveMethods(classDoc);
    classDoc.properties = resolveProperties(classDoc);

    // Call decorate hooks that can modify the method and property docs.
    classDoc.methods.forEach(doc => decorateMethodDoc(doc));
    classDoc.properties.forEach(doc => decoratePropertyDoc(doc));

    // Categorize the current visited classDoc into its Angular type.
    if (isDirective(classDoc)) {
      classDoc.isDirective = true;
      classDoc.directiveExportAs = getDirectiveExportAs(classDoc);
    } else if (isService(classDoc)) {
      classDoc.isService = true;
    } else if (isNgModule(classDoc)) {
      classDoc.isNgModule = true;
    }
  }
function decorateClassDoc ( classDoc ) { // Resolve all methods and properties from the classDoc. Includes inherited docs. classDoc . methods = resolveMethods ( classDoc ) ; classDoc . properties = resolveProperties ( classDoc ) ; // Call decorate hooks that can modify the method and property docs. classDoc . methods . forEach ( doc => decorateMethodDoc ( doc ) ) ; classDoc . properties . forEach ( doc => decoratePropertyDoc ( doc ) ) ; // Categorize the current visited classDoc into its Angular type. if ( isDirective ( classDoc ) ) { classDoc . isDirective = true ; classDoc . directiveExportAs = getDirectiveExportAs ( classDoc ) ; } else if ( isService ( classDoc ) ) { classDoc . isService = true ; } else if ( isNgModule ( classDoc ) ) { classDoc . isNgModule = true ; } }
Decorates all class docs inside of the dgeni pipeline.
- Methods and properties of a class-doc will be extracted into separate variables.
- Identifies directives, services or NgModules and marks them them in class-doc.
Decorates all class docs inside of the dgeni pipeline . - Methods and properties of a class - doc will be extracted into separate variables . - Identifies directives services or NgModules and marks them them in class - doc .