Closed
Description
// @filename: test.js
const mod1 = require('./mod1')
/** @typedef {number} CompilerStatus */
/** @type {CompilerStatus[]} */
var compilerStatus;
mod1;
module.exports = class C {
}
// @filename: mod1.js
/** @type {import("./test")} */
var megaman;
module.exports = megaman
Expected: No error, or maybe a circular reference error somewhere.
Actual: Error on @typedef {number} CompilerStatus
: "Duplicate identifier 'CompilerStatus'.".
Bonus: in test.js, if you export module.exports = {}
you get a stack overflow from the language service. I couldn't get this from the compiler, but I didn't try too hard.