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.
/** * My typedef for eac
Import the declared type in your file File2.js using the function import.
File2.js
import
const persons = require('./File1.js'); /** * @typedef {import('./File1.js').MyObject1} MyObject1 */ class File2 { ...
It works for me.