code: function makeCorporations(agent) {
      let functor = function (id) {
          return new CorporationImpl(agent, id);
      };
      functor.search = search_1.makeDefaultSearch(agent, "corporation" /* CORPORATION */);
      functor.npc = function () {
          return agent.request('get_corporations_npccorps', undefined);
      };
      functor.names = function (ids) {
          if (ids.length > 100) {
              return names_1.getNames(agent, "corporation" /* CORPORATION */, ids);
          }
          else {
              // Use corporation/names end point and map manually
              return agent.request('get_corporations_names', { query: { 'corporation_ids': ids } })
                  .then(result => {
                  let map = new Map();
                  for (let name of result) {
                      map.set(name.corporation_id, name.corporation_name);
                  }
                  return map;
              });
          }
      };
      return functor;
  }
docs: Create a new {@link Corporations} instance that uses the given `agent` to
  make its HTTP requests to the ESI interface.
  
  @param agent The agent making actual requests
  @returns An Corporations API instance