-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Describe the bug
Currently, if we use use both nuxt-typed-router
and @nuxt/content
modules in the same project, the nuxt typecheck
command results with an error
This happens because a component in @nuxtjs/mdc
(a dependency of @nuxt/content
) does not comply with rules enforced by nuxt-typed-router
.
None of the nuxt-typed-router
configuration options currently resolve the issue.
Expected behavior
A configuration option to disable type-checking internal components in node_modules
, allowing libraries that don't comply with nuxt-typed-router
rules to work without issues.
Error output
~/projects/nuxt-starter-iex3xpmq 22s
❯ npm run typecheck
> typecheck
> nuxt typecheck
node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseA.vue:2:4 - error TS2345: Argument of type '{ href: string; target: "_blank" | "_parent" | "_self" | "_top" | null | undefined; }' is not assignable to parameter of type 'Omit<NuxtLinkProps, "to" | "external"> & { to: any; external?: false | undefined; } & Record<string, unknown>'.
Property 'to' is missing in type '{ href: string; target: "_blank" | "_parent" | "_self" | "_top" | null | undefined; }' but required in type '{ to: any; external?: false | undefined; }'.
2 <NuxtLink
~~~~~~~~
.nuxt/typed-router/typed-router.d.ts:40:3
40 to: NuxtRoute<T, P, E>;
~~
'to' is declared here.
Found 1 error in node_modules/@nuxtjs/mdc/dist/runtime/components/prose/ProseA.vue:2
Reproduction
https://stackblitz.com/edit/nuxt-starter-iex3xpmq?file=nuxt.config.ts
Steps to reproduce
npm install
npm run typecheck
Metadata
Metadata
Assignees
Labels
No labels