title: How to get intellisense with own javascript files in vscode
body: <p>I'm utilizing vscode <code>Version 1.14.2 (1.14.2)</code> and I'm trying to get intellisense for my own javascript files. To test this I created two files <code>test.js</code> and <code>main.js</code>. In the <code>test.js</code> I have the following code...</p>
  
  <pre><code>{
    Test = {};
  
    let testObj = {};
  
    Test.getAllTest = function() {
      return testObj;
    };
  }
  </code></pre>
  
  <p>In my <code>main.js</code> file I have the following...</p>
  
  <pre><code>/// &lt;reference path="./test.js" /&gt;
  {
    Test.
  }
  </code></pre>
  
  <p>I'm wanting to have intellisense about my own code. Is it possible to accomplish this in vscode?</p>
  
  <h2>Update August 10, 2017</h2>
  
  <p>The previous code it's a silly snippet as you can notice. Let me paste code from an exercise I'm working on...</p>
  
  <pre><code>"use strict";
  
  var $ = require("../lib/node_modules/jquery/dist/jquery.min.js");
  
  let line = console.log;
  let bakery = {};
  
  bakery.loadInventory = function() {
    return new Promise(function(resolve, reject) {
      $.ajax({
        url: "https://cake-2444b.firebaseio.com/ccakes.json"
      })
        .done(function(data) {
          resolve(data);
        })
        .fail(function(error) {
          reject(error);
        });
    });
  };
  
  module.exports = bakery;
  </code></pre>
  
  <p>jQuery is installed with <code>--save-dev</code> and I suspect that I can't <code>require('jQuery')</code> for that very reason. The previous code is living in a file called <code>bakery-factory.js</code>. Bellow, I'm including a screenshot showing that the intellinsense is not working for the module.</p>
  
  <p><a href="https://i.stack.imgur.com/UYObU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UYObU.png" alt="enter image description here"></a></p>
  
  <p>I want to add that I'm utilizing Grunt to run few tasks. I'm not sure if that has something to do with the intellisense issue. I'm very happy with the editor and I would like to get this to work.</p>
  
  <h2>Update August 11, 2017</h2>
  
  <p>I got it working by following your advice of...</p>
  
  <pre><code>let bakery = {
      loadInventory: function(...
  </code></pre>
  
  <p>The way I had it before doesn't work...</p>
  
  <pre><code>let bakery = {}
  
  bakery.loadInventory = function(...
  </code></pre>
  
  <p>Thank you for explaining!!</p>