CodeZettaInterview Hub

Vue.js · Composition API · Junior · Live Coding

TypeScript with defineProps/defineEmits?

Short Interview Answer

Use generic type params or runtime declaration with types; prefer type-based for clarity.

Detailed Explanation

defineProps<{ title: string }>(). Avoid duplicating runtime + types inconsistently.

Did you know this answer?