I create a template VueJS using typescript, I found the example code has a line
export default class HelloWorld extends Vue {
@Prop() private msg!: string;
}
If I remove !
, vscode said
Property 'msg' has no initializer and is not definitely assigned in the constructor.Vetur(2564)
I searched !
in Google but found nothing, what does it do exactly?