language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Losing context of this in Mixins

Open BulatSa opened this issue 1 year ago • 1 comments

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

BulatSa avatar Jul 02 '24 12:07 BulatSa