title: Incompatible type notation in JSDoc for Google Apps Script online vs locally
body: <p>Consider the following script</p>
  <pre><code>function caller(){
    getSpreadsheet1();// only the online IDE understands this
    getSpreadsheet2();// only the local IDE (VS Code) understands this
  }
  
  /**
   * @returns {SpreadsheetApp.Spreadsheet}
   */
  function getSpreadsheet1(){
    var spreadsheet = SpreadsheetApp.openById('');
    return spreadsheet;
  }
  
  /**
   * @returns {GoogleAppsScript.Spreadsheet.Spreadsheet}
   */
  function getSpreadsheet2(){
    var spreadsheet = SpreadsheetApp.openById('');
    return spreadsheet;
  }
  </code></pre>
  <p>If you paste this script into the (new) Google Apps Script IDE, placing a period (<code>.</code>) after <code>getSpreadsheet1()</code> will trigger the IDE to display the member functions of class <code>Spreadsheet</code>, like <code>addEditor()</code>, for the sake of auto-completion. That is to say, the online IDE understands the type of <code>getSpreadsheet1()</code>.</p>
  <p>I have tried to achieve the same behaviour locally. I copied the script to a local file and I ran <code>npm i -S @types/google-apps-script</code> in the same folder, as per <a href="https://developers.google.com/apps-script/guides/typescript" rel="nofollow noreferrer">this guide</a>. However, I get no autocompletion when placing a period after <code>getSpreadsheet1()</code>, but instead I only get it after placing the period after <code>getSpreadsheet2()</code>.</p>
  <p>Note that my local IDE (VS Code) does understand the type of <code>SpreadsheetApp.openById('')</code>, so that does seem to work correctly.</p>
  <p>Is there a way to get my local IDE to understand the JSDoc comments that use the types like SpreadsheetApp.Spreadsheet required by the online IDE?</p>