No `class` attribute in `nuxt-link` component
szulcus opened this issue · 4 comments
szulcus commented
Type '{ to: "/"; class: string; }' is not assignable to type 'IntrinsicAttributes & Omit<NuxtLinkProps, "to" | "external"> & { to: (Omit<RouteLocationPathRaw | RouteLocationNamedRaw, "name" | "params"> & RoutesNamedLocations) | (Omit<...> & { ...; }) | TypedPathParameter<...>; external?: false | undefined; }'.
Property 'class' does not exist on type 'IntrinsicAttributes & Omit<NuxtLinkProps, "to" | "external"> & { to: (Omit<RouteLocationPathRaw | RouteLocationNamedRaw, "name" | "params"> & RoutesNamedLocations) | (Omit<...> & { ...; }) | TypedPathParameter<...>; external?: false | undefined; }'.ts(2322)
<nuxt-link to="/" class="class-name">Link</nuxt-link>
szulcus commented
The problem also occurs without the module, sorry
szulcus commented
Sorry again for the confusion. However, I have this module and after removing it, the problem does not occur, so it's a problem with the module after all 😅
Workaround:
In .nuxt/typed-router/typed-router.d.ts
:
import type { DefineComponent } from 'vue';
// ...
declare module 'vue' {
interface GlobalComponents {
NuxtLink: DefineComponent<TypedNuxtLinkProps>;
}
}
victorgarciaesgi commented
It's a problem with volar ide, see latest issue or downgrade the extension
szulcus commented
Thanks!