Skip to content

typescript.removeUnusedImports does not work when using defineModel() #5934

@MetRonnie

Description

@MetRonnie

Vue - Official extension or vue-tsc version

3.2.2

VSCode version

1.107.1

Vue version

3.5.24

TypeScript version

5.9.3

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i5-1345U
    Memory: 2.18 GB / 15.66 GB
  Binaries:
    Node: 22.21.1 
    Yarn: 4.11.0 
    npm: 10.9.4

package.json dependencies

Steps to reproduce

  1. Have a SFC file that uses <script setup> and the defineModel() macro.
  2. Run the command TypeScript: remove unused imports in VS Code

What is expected?

It should remove unused imports

What is actually happening?

Nothing happens

Link to minimal reproduction

No response

Any additional comments?

Support for removing unused imports added in #5444

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions