NuxtN
Nuxt9mo ago
5 replies
José Olórtegui

Invalid props not being reported by TypeScript

Hey guys! need some backup over here 👀

I'm new to the vue/nuxt ecosystem, been coding a product on and off for the last 3 months. Now I'm almost finished with the migration of
@nuxt/ui
from v2 to v3.. but I was not been as easy as I expected.

I don't know if this is a thing with vue, nuxt or
@nuxt/ui
but I'm not getting errors from invalid props. In v2 for example I had this code:

<template>
      <USelectMenu
        v-model="selected"
        option-attribute="name"
        placeholder="Buscar un alimento..."
        clear-search-on-close
      />
</template>


And in v3
option-attribute
is no longer a valid prop.. but I'm not getting any type errors. Also even adding a random prop
<USelectMenu sdfjr="asd" :fff="true"
works just fine without any error reporting about an unexpected prop or something like that.

Is that normal? 🤔 if that's the default, how can I make it more strict?
Thanks!
CleanShot_2025-04-30_at_14.28.242x.png
Was this page helpful?