vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.79k stars 392 forks source link

Losing context of this in Mixins #4521

Closed BulatSa closed 1 month ago

BulatSa commented 3 months ago

Vue - Official extension or vue-tsc version

2.0.24

VSCode version

1.90.2

Vue version

2.7.16

TypeScript version

5.5.2

System Info

No response

Steps to reproduce

  1. Add in mixins block function, that use this (for use variable from props or data)
  2. Add Typescript for component with defineComponent

What is expected?

Function in mixins block can use this context of component and can add type checking.

What is actually happening?

Function in mixins block lose this context of component and crashed type checking image

Link to minimal reproduction

No response

Any additional comments?

No response

so1ve commented 3 months ago

This is likely a type issue in vue core, can you reproduce it in a js/ts file?