code: function getAliases(obj) {
    var names = [];
    if (obj._name) {
      names.push(obj._name);
    }
    var aliases = obj._aliases;
    var i, l;
    for (i = 0, l = aliases.length; i < l; i++) {
      names.push(aliases[i]);
    }
    return names;
  }
docs: Get all aliases for a type (including its name).
  
  @param obj {Type|Object} Typically a type or a field. Its aliases property
  must exist and be an array.