code: function() {
              var first = arguments[0];
  
              if (arguments.length == 1) {
                  var id = first[this.typeAttribute] || system.getModuleId(first);
                  this.typeMap[id] = first;
              } else {
                  this.typeMap[first] = arguments[1];
              }
          }
docs: Adds a type id/constructor function mampping to the `typeMap`.
  @method registerType
  @param {string} typeId The type id.
  @param {function} constructor The constructor.