title: How to set an intelliSense of strings to avoid typing invalid values in JavaScript with VS Code
body: <p>I found a cool intelliSense feature when I write the built-in keyword <code>typeof</code> in VS Code,
  It shows a specific options list which contains all valid values that <code>typeof</code> returns as the picture below.</p>
  
  <p><a href="https://i.stack.imgur.com/AZQuS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AZQuS.png" alt="It shows a specific options list"></a></p>
  
  <h2><a href="https://i.stack.imgur.com/fLTZt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fLTZt.png" alt="enter image description here"></a></h2>
  
  <p>This feature make us avoid typing an invalid result when we use the function.</p>
  
  <p>So I'm wondering that can we use jsdoc or eslint to create an intelliSense for a custom function or array? If not, is there any another tool to achieve that?</p>
  
  <pre><code>var dayOptions = [
    'Monday',
    'Tuesday',
    'Wednesday',
    'Thursday',
    'Friday'
  ]
  
  function checkDay(option){ // I don't want to let user input values outside the array above
    // code
  }
  
  checkDay('Friday') // I want to make an intelliSense list here
  checkDay('other') // I want VS Code show me something wrong here
  </code></pre>