I have encountered a strange issue with my Quasar app. I am attempting to define a global variable that consists of metadata about the application in an object format. Despite successfully compiling the app and displaying the correct information on the HTML, I am receiving an error in VSCode.
The problem seems to be originating from src/boot/BackChat.js file. Below is the snippet of code:
import { boot } from 'quasar/wrappers';
const version = '0.0.0';
const backChat = {
version
};
export default boot(({ app, router, store }) => {
app.config.globalProperties.backChat = backChat;
});
In Login.vue file, here is another snippet of code:
// ...
<script>
import { ref } from 'vue';
export default {
data() {
return {
backChat: this.backChat
};
}
}
</script>
Upon further investigation, it appears that there might be an issue with how I am utilizing this interface or it could potentially be a bug related to Vue file validation. It seems like the validator believes that "backChat" in Login.vue is actually a function. When switching the data() method to mounted(), the function error disappears but then I lose access to it in the DOM. As a newcomer to Vue, I find myself puzzled by this behavior.