Skip to content

Leading JSDoc * in type expression incorrectly parsed #38290

Open
@Raynos

Description

@Raynos

I tried the following snippet

/**
 * @typedef {
 *   import('../src/index.js').FakeCloudwatchLogs
 * } FakeCloudwatchLogs
 */

This did not compile with

test/index.js:11:6 - error TS1005: '}' expected.

11  *   import('../src/index.js').FakeCloudwatchLogs
        ~~~~~~

Removing the * and writing

/**
 * @typedef {
     import('../src/index.js').FakeCloudwatchLogs
 * } FakeCloudwatchLogs
 */

Does compile.

I am using typsecript 3.8.3

There is a related issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions