Skip to content

Auto-import in JSDoc always uses ts behaviour #4582

@Ilanaya

Description

@Ilanaya

Vue - Official extension or vue-tsc version

v2.0.26

VSCode version

1.91.0

Vue version

latest

TypeScript version

5.5.2

System Info

No response

Steps to reproduce

In reproduction repo:

  1. Open exampleLangJs.vue
  2. Trigger import suggestions on MyType JSDoc comment

image

  1. Accept first entry

What is expected?

Imports from JSDoc in <script lang="js">/ <script> work like in regular js file:

You can check this in reproduction repo:

  1. Without @import comment
    image
    image

  2. With @import comment
    image
    image

What is actually happening?

Whole d.ts/ts file is imported

image

Link to minimal reproduction

https://github.com/ilanaya/volar-starter

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions