text: "use strict";
  exports.__esModule = true;
  var types_1 = require("../../types");
  /**
   * @method createGetNeighbors
   *
   * @memberof module:core
   *
   * @param {Provider} provider Network provider
   *
   * @return {function} {@link #module_core.getNeighbors `getNeighbors`}
   */
  exports.createGetNeighbors = function (_a) {
      var send = _a.send;
      /**
       * Returns list of connected neighbors.
       *
       * @method getNeighbors
       *
       * @memberof module:core
       *
       * @param {Callback} [callback] - Optional callback
       *
       * @return {Promise}
       * @fulfil {Neighbors}
       * @reject {Error}
       * - Fetch error
       */
      return function getNeighbors(callback) {
          return send({
              command: types_1.IRICommand.GET_NEIGHBORS
          })
              .then(function (_a) {
              var neighbors = _a.neighbors;
              return neighbors;
          })
              .asCallback(callback);
      };
  };
  //# sourceMappingURL=createGetNeighbors.js.map