code: function addPendingRequest(file, offset, type) {
          var requests,
              key = file + "@" + offset.line + "@" + offset.ch,
              $deferredRequest;
  
          // Reject detected exclusions
          if (isFileExcludedInternal(file)) {
              return (new $.Deferred()).reject().promise();
          }
  
          if (_.has(pendingTernRequests, key)) {
              requests = pendingTernRequests[key];
          } else {
              requests = {};
              pendingTernRequests[key] = requests;
          }
  
          if (_.has(requests, type)) {
              $deferredRequest = requests[type];
          } else {
              requests[type] = $deferredRequest = new $.Deferred();
          }
          return $deferredRequest.promise();
      }
docs: Add a pending request waiting for the tern-module to complete.
  If file is a detected exclusion, then reject request.
  
  @param {string} file - the name of the file
  @param {{line: number, ch: number}} offset - the offset into the file the request is for
  @param {string} type - the type of request
  @return {jQuery.Promise} - the promise for the request