While creating a basic Vue component, I encountered an error in the IDE regarding the {{ showUserDropdown }} with the message:
Property 'showUserDropdown' does not exist on type '{}'.ts
Despite adding it to data,
<template>
<div>
{{ showUserDropdown }}
</div>
</template>
<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
name: "TheCompanySiteDetailPage",
expose: [],
data() {
return {
showUserDropdown: false,
};
},
});
</script>
I searched online for a solution and found recommendations to use definecomponent, which I have implemented, but the error persists.