-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
// @Filename: module.js
/** @typedef {number} Num */
module.exports = { a: 1 }
// @Filename: use.js
/** @type {import("./module.js").Num} */
var n;
Expected:
Num is visible in use.js
Actual:
Num is not visible.
Note that the checker already has code to handle structures like this, so modules with modules.exports=
should already almost work. Other kinds of modules may or may not.
The special-case merge code for module.exports=
in the checker puts SymbolFlags.Value on all the symbols, which will be incorrect for this case, so that code will need to be updated.
SergioMorchon and whtsky
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationFixedA PR has been merged for this issueA PR has been merged for this issue