-
Notifications
You must be signed in to change notification settings - Fork 736
@nuxt/ui with strictTemplates enabled causes typecheck errors #2562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Add the |
nuxt autogenerates "include": [
"./nuxt.d.ts",
"../.config/nuxt.*",
"../**/*",
//...
"../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/runtime",
"../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime",
"exclude": [
"../dist",
"../node_modules",
"../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected][email protected]_magica_x3y46x7cew36owemzwsfja6ire/node_modules/nuxt/node_modules",
// ... My point is, that users of nuxt and nuxt/ui shouldn't have to take care of internals of nuxt and nuxt/ui. I don't care, if the solution is a suitable autogenerated |
Why do you use the Since you just want to rely on the generated |
In script you get complaints if you're accessing invalid properties:
That avoids typing mistakes, helps you identify properties that aren't valid any more because the interface changed etc. With
As @hywax has suggested, maybe something is wrong with the config here as type errors within libraries should normally not be reported to the user. As said in #731, it's absolutely not necessary to manually type all the html attributes. This has already been done. For your components, you should be able to merge the types so that the information gets propagated.
We haven't considered Radix Vue as a choice for our ui tooling, but @nuxt/ui. Therefore evaluating @nuxt/ui among others. Using Radix Vue doesn't cause type errors on import.
We want to rely on the autogenerated tsconfig.json as far as possible. As nuxt documentation suggests, the content can be customized to a certain extend. With respect to |
I'm getting the same with nuxtUI 3 - a range of type errors (e.g. the following):
my (explicit)
in {
...
"include": [
"./nuxt.d.ts",
"../.config/nuxt.*",
"../**/*",
"../app/**/*",
"../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_typescri_rd5hwdtwn4bj7r23nvfos4a7oy/node_modules/@nuxt/eslint/runtime",
"../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_typescri_rd5hwdtwn4bj7r23nvfos4a7oy/node_modules/@nuxt/eslint/dist/runtime",
"../node_modules/.pnpm/@[email protected][email protected][email protected]_@[email protected]_@[email protected]_db0_tzbgd2cau3vc57s6khmv4j2bhq/node_modules/@vueuse/nuxt/runtime",
"../node_modules/.pnpm/@[email protected][email protected][email protected]_@[email protected]_@[email protected]_db0_tzbgd2cau3vc57s6khmv4j2bhq/node_modules/@vueuse/nuxt/dist/runtime",
"../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@nuxt/image/runtime",
"../node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@nuxt/image/dist/runtime",
"../node_modules/.pnpm/@[email protected]/node_modules/@nuxtjs/supabase/runtime",
"../node_modules/.pnpm/@[email protected]/node_modules/@nuxtjs/supabase/dist/runtime",
"../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis@_qaiw6ff6hvmtyfmgstfeeguq7q/node_modules/@nuxt/scripts/runtime",
"../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis@_qaiw6ff6hvmtyfmgstfeeguq7q/node_modules/@nuxt/scripts/dist/runtime",
"../node_modules/.pnpm/@[email protected][email protected][email protected]_@[email protected][email protected][email protected]_7dkyqg475r6rxqyezbbytytlbe/node_modules/@nuxt/icon/runtime",
"../node_modules/.pnpm/@[email protected][email protected][email protected]_@[email protected][email protected][email protected]_7dkyqg475r6rxqyezbbytytlbe/node_modules/@nuxt/icon/dist/runtime",
"../node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]_@[email protected]_jit_d66tmxsotqshngmvm64lxygu34/node_modules/@nuxt/fonts/runtime",
"../node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected]_@[email protected]_jit_d66tmxsotqshngmvm64lxygu34/node_modules/@nuxt/fonts/dist/runtime",
"../node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxtjs/color-mode/runtime",
"../node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxtjs/color-mode/dist/runtime",
"../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/runtime",
"../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime",
"../node_modules/.pnpm/@[email protected][email protected]_@[email protected][email protected][email protected]_terser@5._igtxmezb5udka5m7mi7iqepg7y/node_modules/@nuxt/devtools/runtime",
"../node_modules/.pnpm/@[email protected][email protected]_@[email protected][email protected][email protected]_terser@5._igtxmezb5udka5m7mi7iqepg7y/node_modules/@nuxt/devtools/dist/runtime",
"../node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/telemetry/runtime",
"../node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/telemetry/dist/runtime",
".."
],
//...
} |
Same here. Struggling to fix this. |
Hi, `node_modules/.pnpm/@nuxt+ui@3.0.0_@babel[email protected][email protected]_db0@[email protected]_i_e7edc89beac60139632f813d9d9e7d9e/node_modules/@nuxt/ui/dist/runtime/components/Tree.vue:187:16 - error TS2345: Argument of type '{ item: T; index: number; level: number; expanded: boolean; selected: boolean; }' is not assignable to parameter of type '({ item: SlotProps; 'item-leading': SlotProps; 'item-label': SlotProps; 'item-trailing': SlotProps; } & Record<string, SlotProps<...>> & (T["slot"] extends string ? Record<...> : Record<...>))[string] & SlotProps<...> extends (props: infer P) => any ? P : {}'. 187 |
I also have the same problem on my Nuxt project using nuxt/ui >> npx nuxi typecheck
ℹ Nuxt Icon server bundle mode is set to local 11:36:19 μ.μ.
node_modules/@nuxt/ui/dist/runtime/components/Accordion.vue:105:12 - error TS2345: Argument of type '{ item: T; index: number; open: boolean; }' is not assignable to parameter of type 'NonNullable<({ leading: SlotProps<T>; default: SlotProps<T>; trailing: SlotProps<T>; content: SlotProps<T>; body: SlotProps<T>; } & DynamicSlots<...>)["leading"] & SlotProps<...>> extends (props: infer P) => any ? P : {}'.
105 <slot name="leading" :item="item" :index="index" :open="open">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Accordion.vue:110:14 - error TS2345: Argument of type '{ item: T; index: number; open: boolean; }' is not assignable to parameter of type 'NonNullable<({ leading: SlotProps<T>; default: SlotProps<T>; trailing: SlotProps<T>; content: SlotProps<T>; body: SlotProps<T>; } & DynamicSlots<...>)["default"] & SlotProps<...>> extends (props: infer P) => any ? P : {}'.
110 <slot :item="item" :index="index" :open="open">{{ get(item, props.labelKey as string) }}</slot>
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Accordion.vue:113:12 - error TS2345: Argument of type '{ item: T; index: number; open: boolean; }' is not assignable to parameter of type 'NonNullable<({ leading: SlotProps<T>; default: SlotProps<T>; trailing: SlotProps<T>; content: SlotProps<T>; body: SlotProps<T>; } & DynamicSlots<...>)["trailing"] & SlotProps<...>> extends (props: infer P) => any ? P : {}'.
113 <slot name="trailing" :item="item" :index="index" :open="open">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Accordion.vue:120:10 - error TS2345: Argument of type '{ item: T; index: number; open: boolean; }' is not assigna
ble to parameter of type 'NonNullable<(Readonly<{ leading: SlotProps<T>; default: SlotProps<T>; trailing: SlotProps<T>; content: SlotProps<T>; body: SlotProps<T>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["default" | ... 4 more ... | keyof DynamicSlots<...>]> extends (props: infer P) => any ? P : {}'.
120 <slot :name="((item.slot || 'content') as keyof AccordionSlots<T>)" :item="item" :index="index" :open="open">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Accordion.vue:122:14 - error TS2345: Argument of type '{ item: T; index: number; open: boolean; }' is not assigna
ble to parameter of type 'NonNullable<(Readonly<{ leading: SlotProps<T>; default: SlotProps<T>; trailing: SlotProps<T>; content: SlotProps<T>; body: SlotProps<T>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["default" | ... 4 more ... | keyof DynamicSlots<...>]> extends (props: infer P) => any ? P : {}'.
122 <slot :name="((item.slot ? `${item.slot}-body`: 'body') as keyof AccordionSlots<T>)" :item="item" :index="index" :open="open">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Breadcrumb.vue:92:16 - error TS2345: Argument of type '{ item: T; index: number; }' is not assignable to paramete
r of type 'NonNullable<(Readonly<{ item: SlotProps<T>; 'item-leading': SlotProps<T>; 'item-label': SlotProps<T>; 'item-trailing': SlotProps<T>; separator: any; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["separator" | ... 4 more ... | keyof DynamicSlots<...>]> extends (props: infer P) => any ? P : {}'.
92 <slot :name="((item.slot || 'item') as keyof BreadcrumbSlots<T>)" :item="item" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Breadcrumb.vue:93:18 - error TS2345: Argument of type '{ item: T; active: boolean; index: number; }' is not assig
nable to parameter of type 'NonNullable<(Readonly<{ item: SlotProps<T>; 'item-leading': SlotProps<T>; 'item-label': SlotProps<T>; 'item-trailing': SlotProps<T>
; separator: any; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["separator" | ... 4 more ... | keyof DynamicSlots<...>]> extends (props: infer P) => any ? P : {}'.
93 <slot :name="((item.slot ? `${item.slot}-leading`: 'item-leading') as keyof BreadcrumbSlots<T>)" :item="item" :active="index === items!.length - 1" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Breadcrumb.vue:99:20 - error TS2345: Argument of type '{ item: T; active: boolean; index: number; }' is not assig
nable to parameter of type 'NonNullable<(Readonly<{ item: SlotProps<T>; 'item-leading': SlotProps<T>; 'item-label': SlotProps<T>; 'item-trailing': SlotProps<T>
; separator: any; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["separator" | ... 4 more ... | keyof DynamicSlots<...>]> extends (props: infer P) => any ? P : {}'.
99 <slot :name="((item.slot ? `${item.slot}-label`: 'item-label') as keyof BreadcrumbSlots<T>)" :item="item" :active="index === items!.length - 1" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Breadcrumb.vue:104:18 - error TS2345: Argument of type '{ item: T; active: boolean; index: number; }' is not assi
gnable to parameter of type 'NonNullable<(Readonly<{ item: SlotProps<T>; 'item-leading': SlotProps<T>; 'item-label': SlotProps<T>; 'item-trailing': SlotProps<T
>; separator: any; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["separator" | ... 4 more ... | keyof DynamicSlots<...>]> extends (props: infer P) => any ? P : {}'.
104 <slot :name="((item.slot ? `${item.slot}-trailing`: 'item-trailing') as keyof BreadcrumbSlots<T>)" :item="item" :active="index === items!.length - 1" :index="index" />
~~~~
node_modules/@nuxt/ui/dist/runtime/components/ContextMenu.vue:140:8 - error TS2345: Argument of type '{}' is not assignable to parameter of type 'NonNullable<(
{ default(props?: {} | undefined): any; item: SlotProps<NestedItem<T>>; 'item-leading': SlotProps<NestedItem<T>>; 'item-label': SlotProps<...>; 'item-trailing': SlotProps<...>; } & DynamicSlots<...>)["default"] & ((props?: {} | undefined) => any)> extends (props: infer P) => any ? P : {}'.
140 <slot />
~~~~
node_modules/@nuxt/ui/dist/runtime/components/ContextMenuContent.vue:72:6 - error TS2345: Argument of type '{ item: ContextMenuItem; index: number; }' is not a
ssignable to parameter of type 'NonNullable<(Readonly<{ default(props?: {} | undefined): any; item: SlotProps<NestedItem<T>>; 'item-leading': SlotProps<NestedI
tem<T>>; 'item-label': SlotProps<...>; 'item-trailing': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["default" | ... 4 more ... | (MergeTypes<...>["slot"] extends s...'.
72 <slot :name="((item.slot || 'item') as keyof ContextMenuSlots<T>)" :item="item" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/ContextMenuContent.vue:73:8 - error TS2345: Argument of type '{ item: ContextMenuItem; active: boolean | undefine
d; index: number; }' is not assignable to parameter of type 'NonNullable<(Readonly<{ default(props?: {} | undefined): any; item: SlotProps<NestedItem<T>>; 'ite
m-leading': SlotProps<NestedItem<T>>; 'item-label': SlotProps<...>; 'item-trailing': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["default" | ... 4 more ... | (MergeTypes<...>["slot"] extends s...'.
73 <slot :name="((item.slot ? `${item.slot}-leading`: 'item-leading') as keyof ContextMenuSlots<T>)" :item="item" :active="active" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/ContextMenuContent.vue:80:10 - error TS2345: Argument of type '{ item: ContextMenuItem; active: boolean | undefin
ed; index: number; }' is not assignable to parameter of type 'NonNullable<(Readonly<{ default(props?: {} | undefined): any; item: SlotProps<NestedItem<T>>; 'it
em-leading': SlotProps<NestedItem<T>>; 'item-label': SlotProps<...>; 'item-trailing': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["default" | ... 4 more ... | (MergeTypes<...>["slot"] extends s...'.
80 <slot :name="((item.slot ? `${item.slot}-label`: 'item-label') as keyof ContextMenuSlots<T>)" :item="item" :active="active" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/ContextMenuContent.vue:88:10 - error TS2345: Argument of type '{ item: ContextMenuItem; active: boolean | undefin
ed; index: number; }' is not assignable to parameter of type 'NonNullable<(Readonly<{ default(props?: {} | undefined): any; item: SlotProps<NestedItem<T>>; 'it
em-leading': SlotProps<NestedItem<T>>; 'item-label': SlotProps<...>; 'item-trailing': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["default" | ... 4 more ... | (MergeTypes<...>["slot"] extends s...'.
88 <slot :name="((item.slot ? `${item.slot}-trailing`: 'item-trailing') as keyof ContextMenuSlots<T>)" :item="item" :active="active" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/ContextMenuContent.vue:167:8 - error TS2345: Argument of type '{}' is not assignable to parameter of type 'NonNul
lable<({ default(props?: {} | undefined): any; item: SlotProps<NestedItem<T>>; 'item-leading': SlotProps<NestedItem<T>>; 'item-label': SlotProps<...>; 'item-trailing': SlotProps<...>; } & DynamicSlots<...>)["default"] & ((props?: {} | undefined) => any)> extends (props: infer P) => any ? P : {}'.
167 <slot />
~~~~
node_modules/@nuxt/ui/dist/runtime/components/DropdownMenu.vue:149:8 - error TS2345: Argument of type '{ open: boolean; }' is not assignable to parameter of ty
pe 'NonNullable<({ default(props: { open: boolean; }): any; item: SlotProps<NestedItem<T>>; 'item-leading': SlotProps<NestedItem<T>>; 'item-label': SlotProps<...>; 'item-trailing': SlotProps<...>; } & DynamicSlots<...>)["default"] & ((props: { ...; }) => any)> extends (props: infer P) => any ? P : {}'.
149 <slot :open="open" />
~~~~
node_modules/@nuxt/ui/dist/runtime/components/DropdownMenuContent.vue:78:6 - error TS2345: Argument of type '{ item: Extract<NestedItem<T>, { slot: string; }>;
index: number; }' is not assignable to parameter of type 'NonNullable<(Readonly<Omit<DropdownMenuSlots<T>, "default"> & { default(props?: {} | undefined): any; }> & Omit<DropdownMenuSlots<T>, "default"> & { ...; })["default" | ... 4 more ... | Exclude<...>]> extends (props: infer P) => any ? P : {}'.
78 <slot :name="((item.slot || 'item') as keyof DropdownMenuContentSlots<T>)" :item="(item as Extract<NestedItem<T>, { slot: string; }>)" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/DropdownMenuContent.vue:79:8 - error TS2345: Argument of type '{ item: Extract<NestedItem<T>, { slot: string; }>;
active: boolean | undefined; index: number; }' is not assignable to parameter of type 'NonNullable<(Readonly<Omit<DropdownMenuSlots<T>, "default"> & { default
(props?: {} | undefined): any; }> & Omit<DropdownMenuSlots<T>, "default"> & { ...; })["default" | ... 4 more ... | Exclude<...>]> extends (props: infer P) => any ? P : {}'.
79 <slot :name="((item.slot ? `${item.slot}-leading`: 'item-leading') as keyof DropdownMenuContentSlots<T>)" :item="(item as Extract<NestedItem<T>, { slot: string; }>)" :active="active" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/DropdownMenuContent.vue:86:10 - error TS2345: Argument of type '{ item: Extract<NestedItem<T>, { slot: string; }>
; active: boolean | undefined; index: number; }' is not assignable to parameter of type 'NonNullable<(Readonly<Omit<DropdownMenuSlots<T>, "default"> & { defaul
t(props?: {} | undefined): any; }> & Omit<DropdownMenuSlots<T>, "default"> & { ...; })["default" | ... 4 more ... | Exclude<...>]> extends (props: infer P) => any ? P : {}'.
86 <slot :name="((item.slot ? `${item.slot}-label`: 'item-label') as keyof DropdownMenuContentSlots<T>)" :item="(item as Extract<NestedItem<T>, { slot: string; }>)" :active="active" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/DropdownMenuContent.vue:94:10 - error TS2345: Argument of type '{ item: Extract<NestedItem<T>, { slot: string; }>
; active: boolean | undefined; index: number; }' is not assignable to parameter of type 'NonNullable<(Readonly<Omit<DropdownMenuSlots<T>, "default"> & { defaul
t(props?: {} | undefined): any; }> & Omit<DropdownMenuSlots<T>, "default"> & { ...; })["default" | ... 4 more ... | Exclude<...>]> extends (props: infer P) => any ? P : {}'.
94 <slot :name="((item.slot ? `${item.slot}-trailing`: 'item-trailing') as keyof DropdownMenuContentSlots<T>)" :item="(item as Extract<NestedItem<T>, { slot: string; }>)" :active="active" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/DropdownMenuContent.vue:176:8 - error TS2345: Argument of type '{}' is not assignable to parameter of type 'NonNu
llable<(Omit<DropdownMenuSlots<T>, "default"> & { default(props?: {} | undefined): any; })["default"] & ((props?: {} | undefined) => any)> extends (props: infer P) => any ? P : {}'.
176 <slot />
~~~~
node_modules/@nuxt/ui/dist/runtime/components/NavigationMenu.vue:221:6 - error TS2345: Argument of type '{ item: NavigationMenuItem; index: number; }' is not a
ssignable to parameter of type 'NonNullable<(Readonly<{ item: SlotProps<NestedItem<T>>; 'item-leading': SlotProps<NestedItem<T>>; 'item-label': SlotProps<Neste
dItem<T>>; 'item-trailing': SlotProps<...>; 'item-content': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["item" | ... 4 more ... | (MergeTypes<...>["slot"] extends ...'.
221 <slot :name="((item.slot || 'item') as keyof NavigationMenuSlots<T>)" :item="item" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/NavigationMenu.vue:222:8 - error TS2345: Argument of type '{ item: NavigationMenuItem; active: boolean | undefine
d; index: number; }' is not assignable to parameter of type 'NonNullable<(Readonly<{ item: SlotProps<NestedItem<T>>; 'item-leading': SlotProps<NestedItem<T>>;
'item-label': SlotProps<NestedItem<T>>; 'item-trailing': SlotProps<...>; 'item-content': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["item" | ... 4 more ... | (MergeTypes<...>["slot"] extends ...'.
222 <slot :name="((item.slot ? `${item.slot}-leading` : 'item-leading') as keyof NavigationMenuSlots<T>)" :item="item" :active="active" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/NavigationMenu.vue:231:10 - error TS2345: Argument of type '{ item: NavigationMenuItem; active: boolean | undefin
ed; index: number; }' is not assignable to parameter of type 'NonNullable<(Readonly<{ item: SlotProps<NestedItem<T>>; 'item-leading': SlotProps<NestedItem<T>>;
'item-label': SlotProps<NestedItem<T>>; 'item-trailing': SlotProps<...>; 'item-content': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["item" | ... 4 more ... | (MergeTypes<...>["slot"] extends ...'.
231 <slot :name="((item.slot ? `${item.slot}-label` : 'item-label') as keyof NavigationMenuSlots<T>)" :item="item" :active="active" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/NavigationMenu.vue:239:10 - error TS2345: Argument of type '{ item: NavigationMenuItem; active: boolean | undefin
ed; index: number; }' is not assignable to parameter of type 'NonNullable<(Readonly<{ item: SlotProps<NestedItem<T>>; 'item-leading': SlotProps<NestedItem<T>>;
'item-label': SlotProps<NestedItem<T>>; 'item-trailing': SlotProps<...>; 'item-content': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["item" | ... 4 more ... | (MergeTypes<...>["slot"] extends ...'.
239 <slot :name="((item.slot ? `${item.slot}-trailing` : 'item-trailing') as keyof NavigationMenuSlots<T>)" :item="item" :active="active" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/NavigationMenu.vue:282:12 - error TS2345: Argument of type '{ item: NavigationMenuItem; active: boolean; index: n
umber; }' is not assignable to parameter of type 'NonNullable<(Readonly<{ item: SlotProps<NestedItem<T>>; 'item-leading': SlotProps<NestedItem<T>>; 'item-label
': SlotProps<NestedItem<T>>; 'item-trailing': SlotProps<...>; 'item-content': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["item" | ... 4 more ... | (MergeTypes<...>["slot"] extends ...'.
282 <slot :name="((item.slot ? `${item.slot}-content` : 'item-content') as keyof NavigationMenuSlots<T>)" :item="item" :active="active" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Stepper.vue:147:16 - error TS2345: Argument of type '{ item: T; }' is not assignable to parameter of type 'NonNul
lable<({ indicator: SlotProps<T>; title: SlotProps<T>; description: SlotProps<T>; content: SlotProps<T>; } & DynamicSlots<T>)["indicator"] & SlotProps<...>> extends (props: infer P) => any ? P : {}'.
147 <slot name="indicator" :item="item">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Stepper.vue:164:14 - error TS2345: Argument of type '{ item: T; }' is not assignable to parameter of type 'NonNul
lable<({ indicator: SlotProps<T>; title: SlotProps<T>; description: SlotProps<T>; content: SlotProps<T>; } & DynamicSlots<T>)["title"] & SlotProps<...>> extends (props: infer P) => any ? P : {}'.
164 <slot name="title" :item="item">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Stepper.vue:169:14 - error TS2345: Argument of type '{ item: T; }' is not assignable to parameter of type 'NonNul
lable<({ indicator: SlotProps<T>; title: SlotProps<T>; description: SlotProps<T>; content: SlotProps<T>; } & DynamicSlots<T>)["description"] & SlotProps<...>> extends (props: infer P) => any ? P : {}'.
169 <slot name="description" :item="item">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Stepper.vue:178:8 - error TS2345: Argument of type '{ item: Extract<T, { slot: string; }>; }' is not assignable t
o parameter of type 'NonNullable<(Readonly<{ indicator: SlotProps<T>; title: SlotProps<T>; description: SlotProps<T>; content: SlotProps<T>; } & DynamicSlots<T>> & { ...; } & DynamicSlots<...>)["content" | ... 3 more ... | (T["slot"] extends string ? T["slot"] : never)]> extends (props: infer P) => any ? P : {}'.
178 <slot
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Table.vue:317:10 - error TS2345: Argument of type '{}' is not assignable to parameter of type 'NonNullable<({ exp
anded: (props: { row: Row<T>; }) => any; empty: (props?: {} | undefined) => any; loading: (props?: {} | undefined) => any; caption: (props?: {} | undefined) => any; } & Record<...> & Record<...> & Record<...> & Record<...>)["caption"] & ((props?: {} | undefined) => any)> extends (props: infer P) =>...'.
317 <slot name="caption">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Table.vue:330:14 - error TS2345: Argument of type '{ column: Column<T, unknown>; header: Header<T, unknown>; tabl
e: Table<T>; }' is not assignable to parameter of type 'NonNullable<({ expanded: (props: { row: Row<T>; }) => any; empty: (props?: {} | undefined) => any; load
ing: (props?: {} | undefined) => any; caption: (props?: {} | undefined) => any; } & Record<...> & Record<...> & Record<...> & Record<...>)[string] & ((props: HeaderContext<...>) => any) & ((props: CellContext<...>)...'.
330 <slot :name="`${header.id}-header`" v-bind="header.getContext()">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Table.vue:355:18 - error TS2345: Argument of type '{ cell: Cell<T, unknown>; column: Column<T, unknown>; getValue
: Getter<unknown>; renderValue: Getter<unknown>; row: Row<T>; table: Table<T>; }' is not assignable to parameter of type 'NonNullable<({ expanded: (props: { ro
w: Row<T>; }) => any; empty: (props?: {} | undefined) => any; loading: (props?: {} | undefined) => any; caption: (props?: {} | undefined) => any; } & Record<...> & Record<...> & Record<...> & Record<...>)[string] & ((props: HeaderContext<...>) => any) & ((props: CellContext<...>)...'.
355 <slot :name="`${cell.column.id}-cell`" v-bind="cell.getContext()">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Table.vue:362:18 - error TS2345: Argument of type '{ row: Row<T>; }' is not assignable to parameter of type 'NonN
ullable<({ expanded: (props: { row: Row<T>; }) => any; empty: (props?: {} | undefined) => any; loading: (props?: {} | undefined) => any; caption: (props?: {} | undefined) => any; } & Record<...> & Record<...> & Record<...> & Record<...>)["expanded"] & ((props: { ...; }) => any)> extends (props: infer P) => any ?...'.
362 <slot name="expanded" :row="row" />
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Table.vue:370:14 - error TS2345: Argument of type '{}' is not assignable to parameter of type 'NonNullable<({ exp
anded: (props: { row: Row<T>; }) => any; empty: (props?: {} | undefined) => any; loading: (props?: {} | undefined) => any; caption: (props?: {} | undefined) => any; } & Record<...> & Record<...> & Record<...> & Record<...>)["loading"] & ((props?: {} | undefined) => any)> extends (props: infer P) =>...'.
370 <slot name="loading" />
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Table.vue:376:14 - error TS2345: Argument of type '{}' is not assignable to parameter of type 'NonNullable<({ exp
anded: (props: { row: Row<T>; }) => any; empty: (props?: {} | undefined) => any; loading: (props?: {} | undefined) => any; caption: (props?: {} | undefined) => any; } & Record<...> & Record<...> & Record<...> & Record<...>)["empty"] & ((props?: {} | undefined) => any)> extends (props: infer P) => a...'.
376 <slot name="empty">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Tabs.vue:118:10 - error TS2345: Argument of type '{ item: T; index: number; }' is not assignable to parameter of
type 'NonNullable<({ leading: SlotProps<T>; default: SlotProps<T>; trailing: SlotProps<T>; content: SlotProps<T>; } & DynamicSlots<T, undefined, { ...; }>)["leading"] & SlotProps<...>> extends (props: infer P) => any ? P : {}'.
118 <slot name="leading" :item="item" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Tabs.vue:124:12 - error TS2345: Argument of type '{ item: T; index: number; }' is not assignable to parameter of
type 'NonNullable<({ leading: SlotProps<T>; default: SlotProps<T>; trailing: SlotProps<T>; content: SlotProps<T>; } & DynamicSlots<T, undefined, { ...; }>)["default"] & SlotProps<...>> extends (props: infer P) => any ? P : {}'.
124 <slot :item="item" :index="index">{{ get(item, props.labelKey as string) }}</slot>
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Tabs.vue:127:10 - error TS2345: Argument of type '{ item: T; index: number; }' is not assignable to parameter of
type 'NonNullable<({ leading: SlotProps<T>; default: SlotProps<T>; trailing: SlotProps<T>; content: SlotProps<T>; } & DynamicSlots<T, undefined, { ...; }>)["trailing"] & SlotProps<...>> extends (props: infer P) => any ? P : {}'.
127 <slot name="trailing" :item="item" :index="index" />
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Tabs.vue:133:10 - error TS2345: Argument of type '{ item: Extract<T, { slot: string; }>; index: number; }' is not
assignable to parameter of type 'NonNullable<(Readonly<{ leading: SlotProps<T>; default: SlotProps<T>; trailing: SlotProps<T>; content: SlotProps<T>; } & Dyna
micSlots<T, undefined, { ...; }>> & { ...; } & DynamicSlots<...>)["default" | ... 3 more ... | (T["slot"] extends string ? T["slot"] : never)]> extends (props: infer P) => any ? P : {}'.
133 <slot :name="((item.slot || 'content') as keyof TabsSlots<T>)" :item="(item as Extract<T, { slot: string; }>)" :index="index">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Tree.vue:182:12 - error TS2345: Argument of type '{ item: Extract<NestedItem<T>, { slot: string; }>; index: numbe
r; level: number; expanded: boolean; selected: boolean; }' is not assignable to parameter of type 'NonNullable<(Readonly<{ item: SlotProps<NestedItem<T>>; 'ite
m-leading': SlotProps<NestedItem<T>>; 'item-label': SlotProps<NestedItem<T>>; 'item-trailing': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["item" | ... 3 more ... | (NestedItem<...>["slot"] extends string ? NestedItem<...>["slot"]...'.
182 <slot :name="((item.slot || 'item') as keyof TreeSlots<T>)" v-bind="{ index, level, expanded: isExpanded, selected: isSelected }" :item="(item as Extract<NestedItem<T>, { slot: string; }>)">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Tree.vue:183:14 - error TS2345: Argument of type '{ item: Extract<NestedItem<T>, { slot: string; }>; index: numbe
r; level: number; expanded: boolean; selected: boolean; }' is not assignable to parameter of type 'NonNullable<(Readonly<{ item: SlotProps<NestedItem<T>>; 'ite
m-leading': SlotProps<NestedItem<T>>; 'item-label': SlotProps<NestedItem<T>>; 'item-trailing': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["item" | ... 3 more ... | (NestedItem<...>["slot"] extends string ? NestedItem<...>["slot"]...'.
183 <slot :name="((item.slot ? `${item.slot}-leading`: 'item-leading') as keyof TreeSlots<T>)" v-bind="{ index, level, expanded: isExpanded, selected: isSelected }" :item="(item as Extract<NestedItem<T>, { slot: string; }>)">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Tree.vue:197:16 - error TS2345: Argument of type '{ item: Extract<NestedItem<T>, { slot: string; }>; index: numbe
r; level: number; expanded: boolean; selected: boolean; }' is not assignable to parameter of type 'NonNullable<(Readonly<{ item: SlotProps<NestedItem<T>>; 'ite
m-leading': SlotProps<NestedItem<T>>; 'item-label': SlotProps<NestedItem<T>>; 'item-trailing': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["item" | ... 3 more ... | (NestedItem<...>["slot"] extends string ? NestedItem<...>["slot"]...'.
197 <slot :name="((item.slot ? `${item.slot}-label`: 'item-label') as keyof TreeSlots<T>)" v-bind="{ item, index, level, expanded: isExpanded, selected: isSelected }" :item="(item as Extract<NestedItem<T>, { slot: string; }>)">
~~~~
node_modules/@nuxt/ui/dist/runtime/components/Tree.vue:203:16 - error TS2345: Argument of type '{ item: Extract<NestedItem<T>, { slot: string; }>; index: numbe
r; level: number; expanded: boolean; selected: boolean; }' is not assignable to parameter of type 'NonNullable<(Readonly<{ item: SlotProps<NestedItem<T>>; 'ite
m-leading': SlotProps<NestedItem<T>>; 'item-label': SlotProps<NestedItem<T>>; 'item-trailing': SlotProps<...>; } & DynamicSlots<...>> & { ...; } & DynamicSlots<...>)["item" | ... 3 more ... | (NestedItem<...>["slot"] extends string ? NestedItem<...>["slot"]...'.
203 <slot :name="((item.slot ? `${item.slot}-trailing`: 'item-trailing') as keyof TreeSlots<T>)" v-bind="{ item, index, level, expanded: isExpanded, selected: isSelected }" :item="(item as Extract<NestedItem<T>, { slot: string; }>)">
~~~~
Found 44 errors in 11 files.
Errors Files
5 node_modules/@nuxt/ui/dist/runtime/components/Accordion.vue:105
4 node_modules/@nuxt/ui/dist/runtime/components/Breadcrumb.vue:92
1 node_modules/@nuxt/ui/dist/runtime/components/ContextMenu.vue:140
5 node_modules/@nuxt/ui/dist/runtime/components/ContextMenuContent.vue:72
1 node_modules/@nuxt/ui/dist/runtime/components/DropdownMenu.vue:149
5 node_modules/@nuxt/ui/dist/runtime/components/DropdownMenuContent.vue:78
5 node_modules/@nuxt/ui/dist/runtime/components/NavigationMenu.vue:221
4 node_modules/@nuxt/ui/dist/runtime/components/Stepper.vue:147
6 node_modules/@nuxt/ui/dist/runtime/components/Table.vue:317
4 node_modules/@nuxt/ui/dist/runtime/components/Tabs.vue:118
4 node_modules/@nuxt/ui/dist/runtime/components/Tree.vue:182
ERROR Process exited with non-zero status (2) 11:36:28 μ.μ. |
Closing this as it seems to have been fixed already. |
Environment
Version
v3.0.0-alpha.8
Reproduction
https://github.com/some-user123/nuxt-ui-3-typeerrors
Description
npx nuxi typecheck
Expected: no errors
Actually: 35 errors
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: