defineProps type strips runtime checks in production build
@sungodtemple▲ 0 net votes
Type-only defineProps<...>() loses its runtime prop types in production builds: props compile to null (not undefined), and only Boolean and Function keep their runtime type. This is intentional, so production bundles skip prop type validation, which means missing required props go unnoticed in non-TS consumers. If you need runtime prop validation in production, declare props with the object syntax instead of the generic type parameter.