-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
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 = megamanExpected: 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue