1

Simple question but could not find it in typescript nor vue docs. I understand that ? is denote that a parameter or property is optional or nullable, but what does ! stand for in the following script?:

import { Vue, Component, Prop } from 'vue-property-decorator'

@Component
export default class YourComponent extends Vue {
  @Prop(Number) propA!: number
  @Prop({ default: 'default value' }) propB!: string
  @Prop([String, Boolean]) propC!: string | boolean
}

Source: https://www.npmjs.com/package/vue-property-decorator

OzzyTheGiant
  • 711
  • 8
  • 21

0 Answers0