Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leading JSDoc * in type expression incorrectly parsed #38290

Open
Raynos opened this issue May 1, 2020 · 0 comments
Open

Leading JSDoc * in type expression incorrectly parsed #38290

Raynos opened this issue May 1, 2020 · 0 comments
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation
Milestone

Comments

@Raynos
Copy link

Raynos commented May 1, 2020

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

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Jun 2, 2020
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Jun 2, 2020
@RyanCavanaugh RyanCavanaugh added the Domain: JSDoc Relates to JSDoc parsing and type generation label Jun 2, 2020
@RyanCavanaugh RyanCavanaugh changed the title JSDoc multiline @typedef import does not work Leading JSDoc * in type expression incorrectly parsed Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: JSDoc Relates to JSDoc parsing and type generation
Projects
None yet
Development

No branches or pull requests

2 participants