1import FlashInterface from '@/interfaces/FlashInterface';
2import { ref,PropType } from 'vue';
3import { useStore } from 'vuex';
4
5export default {
6 props: {
7 message: {
8 type: Object as PropType<FlashInterface>,
9 required: true
10 }
11 },
12 setup(props): Record<string, unknown> {
13 // Stuff
14 }
15};
16
1<script>
2// you need npm i vue-property-decorator
3import { Component, Prop, Vue } from 'vue-property-decorator'
4@Component
5export default class HelloWorld extends Vue {
6 @Prop() readonly msg!: string
7 @Prop({default: 'John doe'}) readonly name: string
8 @Prop({required: true}) readonly age: number
9 @Prop(String) readonly address: string
10 @Prop({required: false, type: String, default: 'Developer'}) readonly job: string
11}
12</script>