Currently, I am developing an application using Vue.js 2 with Typescript and utilizing the vue-property-decorator attributes. Recently, I made the decision to refactor a majority of my code which has resulted in encountering errors whenever I pass a binded property to my Vue components through the @Prop decorator. The error message states:
Invalid prop: type check failed for prop "pager". Expected PagerSettings, got Object
The frustrating aspect is that despite these error messages, the application still functions correctly. However, seeing these errors in the browser console is quite bothersome. By changing the property type to "any," the errors disappear, but this defeats the purpose of using Typescript.
Upon researching similar issues, the common solution suggested was that "you're not passing what you think you're passing." Yet, I am confident that this is not the case. This issue arises consistently with every prop passed to a component, regardless of its type. Interestingly, this problem began occurring after transitioning my code from another project to a new one based on a boilerplate template.
I have compared the tsconfig.json files and confirmed that they are identical. Additionally, the versions listed in my package.json align with those in the previous project. Although there are some minor variations in the vue.config.js file, none of them seem significant enough to impact how variables are passed through the @Prop directive.
Has anyone encountered a similar situation before? What other avenues should I explore to pinpoint the cause of this issue?