title: How to "import" a typedef from one file to another in JSDoc using Node.js?
body: <p>Let's say I have a file named "File1.js". In this file, I export an object of objects and I give each object a typedef, like so.</p>
  
  <pre><code>/**
   * My typedef for each object.
   * @typedef {Object} MyObject1
   * @property {String} username Your username
   * @property {String} realname Your real name.
   * @property {boolean} isUnique Are you unique as a person?
   */
  module.exports = {
    /**
     * Person One!
     * @type {MyObject1}
     */
    myperson: {
      username: 'TheDragonSlayer',
      realname: 'George',
      isUnique: true
    },
    /**
     * Person Two!
     * @type {MyObject1}
     */
    myperson2: {
      username: 'BobMagee',
      realname: 'Bob',
      isUnique: false
    }
  }
  </code></pre>
  
  <p>Now, in a file named "File2.js", I reference this object in a constructor and set it to a new <code>MyObject1</code>.</p>
  
  <pre><code>const persons = require('./File1.js');
  
  class File2 {
    constructor(options = {}) {
      /**
       * The person for this file.
       * @type {MyObject1}
       */
      this.person = options.person ? persons[options.person] : persons.myperson2;
    }
  }
  
  module.exports = File2;
  </code></pre>
  
  <p>I use Visual Studio Code to develop, so by pressing Ctrl+Space I get IntelliSense. Within file one and while I'm making the person objects, IntelliSense tells me that username is a string, realname is a string, and isUnique is a boolean. But, when I go into file2 and reference the newly made person via <code>this.person</code>, when typing <code>this.person.username</code> it does not come up with the expected result of "Username: String".</p>
  
  <p>Is it possible to use the typedef <code>MyObject1</code> in File2 in vanilla Node.js, or am I out of luck?</p>
  
  <p>Edit: With some more information, I was able to find answers with @export and @import for TypeScript, as well as a  tag of sorts that I tried as well. All of which to no avail. I also tried marking File1.js as a @module, and doing <code>module:mymodule~MyMethod</code>, but every time I did that it'd just mark this.person as a NodeModule instead of the method itself.</p>