Type recognised everywhere but the component
I declared an interface in the
/types
directory. I can use this type in app.vue
and under /pages
. However, when I use it in a component, I get: Unresolvable type reference or unsupported built-in utility type
.
Here is a stackblitz replicating the issue: https://stackblitz.com/edit/github-o4bvcj?file=app.vue
If you comment out the usage of the TileData
type in the component it starts to work again even though it's still used in app.vue
3 Replies
I found this https://github.com/vuejs/core/issues/8612#issuecomment-1600030885 but when I add this to my nuxt config, I get :
Internal server error: Failed to load TypeScript, which is required for resolving imported types. Please make sure "typescript is installed as a project dependency.
try to remove
declare
that wasn't it but changing from
to
worked for some reason