-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Experience EnhancementNoncontroversial enhancementsNoncontroversial enhancementsSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
JSDoc is lost when an identifier is re-exported using export { default as X } from …
. Consider the example below
// File: mod-a.ts
/**
* Some jsdoc here.
*/
export default = 42
/* ^^^ jsdoc works over the `default` keyword */
// File: mod-b.ts
export { default as fortytwo } from './mod-a'
/* ^^^ jsdoc works over the `default` keyword, but not over the `fortytwo` keyword */
// File: mod-c.ts
import { fortytwo } from './mod-b'
console.log(fortytwo)
/* ^^^ no jsdoc available for `fortytwo` */
A workaround is to modify file mod-a.ts
like this:
// File: mod-a.ts
/**
* Some jsdoc here.
*/
const fortytwo = 42
export default fortytwo
Tiagoperes, hugomrdias and discretegames
Metadata
Metadata
Assignees
Labels
Experience EnhancementNoncontroversial enhancementsNoncontroversial enhancementsSuggestionAn idea for TypeScriptAn idea for TypeScript