If I am using TypeScript version 4.1 and have a component structured like this.
@Component
export default class Test extends Vue {
@Prop() private msg!: string;
private testObj={
msg: this.msg,
test: 123
}
created(){
console.log(JSON.parse(JSON.stringify(this.testObj)));
}
}
When checking the console, the output will be:
{
msg: "Welcome to Your Vue.js + TypeScript App"
test: 123
}
However, If I update TypeScript to version 4.3 while keeping the same code structure, the console will only display:
{
test: 123
}
msg - prop has been removed
Question: Why did this change occur?