I have encountered an issue while using Vue.js with Typescript. The code I am working with is pretty straightforward, utilizing vue-class-component and vue-property-decorator.
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';
@Component
export default class Child extends Vue {
@Prop(String) private value!: string;
}
</script>
When passing a string as props to the Child component, everything works seamlessly without any warnings or errors. However, when attempting to pass a number, a warning appears during runtime like the one shown in the image below:
https://i.sstatic.net/I2kj8.jpg
Interestingly, there are no compilation errors. Is there a way to perform type checks at "COMPILE" time to catch such issues beforehand?