Skip to content

assert when checking a type reference in a jsdoc type literal #23574

@sandersn

Description

@sandersn

After #23511, the assert in getJSDocHost throws when checking a type reference in a jsdoc type literal:

function PluginFunction() {
}
/**
 * @param {object} options Options for the profiled fn.
 * @param {PluginFunction} options.fn Plugin function
 * @returns {*} Chainable hooked function.
 */
const makeNewProfiledTapFn = ({ fn }) => {
};

Found by compiling webpack with typescript from master.

Expected behavior:
PluginFunction is resolved as a type.

Actual behavior:
Assert, options.fn has a parent that is not a jsdoc comment. It is a jsdoc type literal.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions