How to omit 'defineComponent' in vue3
<script setup lang="ts">
import { reactive, PropType } from 'vue'
defineProps({
msg: {
type: Object as PropType<string>,
required: false,
default: "hi"
}
})
/*
defineProps<{
msg: {
type: string,
required: false,
default: "hi",
}
}>()
*/
const dict = reactive({
})
</script>
Did you see the setup
keyword out there? That’s the key.