Skip to content

JSDoc not recognized for default export expressions #24033

@ghost

Description

TypeScript Version: 2.8.3

Search Terms:
jsdoc default export expression type

Code

import webpack from 'webpack';

//  works
/** @type {webpack.Configuration[]} */
const foo = [ {}, {} ]; // has correct type

/** @type {webpack.Configuration[]} */
export default [ {}, {} ]; // has wrong type

/** @export {webpack.Configuration[]} */
export default [ {}, {} ]; // has wrong type

/** @exports {webpack.Configuration[]} */
export default [ {}, {} ]; // has wrong type

Expected behavior:
JSDoc type information is used.

Actual behavior:
JSDoc type information is not used.

Playground Link: n/a

Related Issues: none

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Help WantedYou can do this

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions