I am using WebStorm 2024.3.1.1 on MacOS for my current Vue.js project, but the recognition of class methods of reactive objects does not work as expected, i.e. WebStorm is displaying "unresolved function"-warnings on code that actually works.
For example, in the code below, WebStorm doesn't recognize the sayHello() method. I understand that Vue.js wraps objects with UnwrapNestedRef<Person>, but is there a way to make WebStorm recognize the class methods?
<script setup>
class Person {
constructor(name) {
this.name = name;
}
sayHello() {
return `Hello ${this.name}!`;
}
}
const p = reactive(new Person("Florian"));
p.sayHello(); // Unresolved function or method 'sayHello()'
</script>
<template>
...
</template>
reactive<Person>(new Person("Florian")), check if this changes anything