toNative with PhpStorm
julienbrunet21 opened this issue · 5 comments
Vue may remove supporting for old class component. I suggest using `toNative` in every recent projects, it could provide best compatibility.
Originally posted by @ruojianll in #65 (comment)
Hello,
Thanks for the work provided with vue-facing-decorator.
I'm facing the same issue reported here : #65
As said by @ruojianll above, I'm trying to use 'toNative' to solve my issue.
With 'toNative', HMR works well but I have a problem with PhpStorm that is not recognizing methods and imported components anymore.
Here is an example :
<script lang="ts">
import { Component, toNative, Vue } from 'vue-facing-decorator';
import AppBtn from '@/shared/component/btn/AppBtn.vue';
@Component({components: {AppBtn}})
class HelloWorld extends Vue {
get label(): string {
return 'HelloWorld';
}
}
export default toNative(HelloWorld);
</script>
<template>
<AppBtn></AppBtn>
{{ label }}
</template>
<style scoped></style>
PhpStorm displays following errors :
Vue: Object literal may only specify known properties, and 'AppBtn' does not exist in type 'ComponentConsOption'.
Unresolved variable or type label
Component AppBtn is not imported
Can someone help ?
Sorry, we can't provide any support for IDEs at the moment.
Hello,
Thanks for your reply.
I'll open an issue on the JetBrain's tracker and I'll keep this feed updated for those who might face the same issue.
Here is the issue on the JetBrain's tracker : https://youtrack.jetbrains.com/issue/WI-75706/Vue-3-vue-facing-decorator-toNative
Hello, just got an answer from the JetBrain's team saying that there is not ETA for implementing the support of toNative in PhpStorm at the moment...