Skip to content

jsdoc type including module: prefix is not parsed correctly #25684

@jkieboom

Description

@jkieboom

TypeScript Version: 3.0.0-dev.201xxxxx

Search Terms: jsdoc parse type module

Code

/**
 * @module namespaced/class/Type
 */

/**
 * Refers to a module: prefixed type
 * @param {module:namespaced/class/Type} param - A parameter
 **/
function f(type: Type) {}

Expected behavior:

When inspecting the AST (in this case for a tslint rule), I expected the type of the JSDocParameterTag node to be module:namespaced/class/Type. Instead, it appears parsing the type stopped at : and the node.comment part is :namespaced/class/Type} param - A parameter.

Actual behavior:

I would expect the type to be correctly parsed as well as the remainder of the @param tag.

Playground Link:

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions