code: function buildTypes(schemas, types, targetModule, isTypeFunction) {
      for (var i = 0; i < schemas.length; i++) {
          var type = schemas[i];
          // Vector is already defined by class TypeVector
          if ('vector' !== type.predicate &&
              ( !types || types.indexOf(type[isTypeFunction ? 'method' : 'type']) > -1)) {
              var typeName;
              if (isTypeFunction) {
                  typeName = type.method;
                  var newFunction = buildTypeFunction(targetModule._id, type);
                  setType(typeName, targetModule, newFunction, true);
              } else {
                  typeName = type.predicate;
                  var newConstructor = buildType(targetModule._id, type);
                  setType(typeName, targetModule, newConstructor, false);
              }
          }
      }
  }
docs: Types builder