Skip to content

@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

Closed
some-user123 opened this issue Nov 7, 2024 · 10 comments
Closed

@nuxt/ui with strictTemplates enabled causes typecheck errors #2562

some-user123 opened this issue Nov 7, 2024 · 10 comments
Labels
bug Something isn't working v3 #1289

Comments

@some-user123
Copy link

Environment


  • Operating System: Windows_NT
  • Node Version: v20.11.1
  • Nuxt Version: 3.14.0
  • CLI Version: 3.15.0
  • Nitro Version: 2.10.2
  • Package Manager: [email protected]
  • Builder: -
  • User Config: default
  • Runtime Modules: @nuxt/[email protected]
  • Build Modules: -

Version

v3.0.0-alpha.8

Reproduction

https://github.com/some-user123/nuxt-ui-3-typeerrors

Description

  • Installed nuxt
  • Installed and configured @nuxt/ui
  • Installed typescript/vue-tsc
  • Enabled strictTemplates in tsconfig.json
  • Run npx nuxi typecheck

Expected: no errors

Actually: 35 errors

$ npx nuxi typecheck
ℹ Nuxt Icon server bundle mode is set to local                                                      20:01:44
node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Alert.vue:126:11 - error TS2353: Object literal may only specify known properties, and '"aria-label"' does not exist in type '{ readonly label?: string | undefined; readonly color?: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral" | undefined; readonly variant?: "link" | "solid" | ... 4 more ... | undefined; ... 36 more ...; readonly inactiveClass?: string | undefined; } & VNodeProps & AllowedComponentProps & ...'.

126           aria-label="Close"
              ~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Avatar.vue:75:8 - error TS2353: Object literal may only specify known properties, and 'alt' does not exist in type 'Partial<{ as: AsTag | Component<any, any, any, ComputedOptions, MethodOptions, {}, any>; }> & Omit<{ readonly as: Component | AsTag; readonly src: string; readonly asChild?: boolean | undefined; onLoadingStatusChange?: ((value: ImageLoadingStatus) => any) | undefined; } & VNodeProps & AllowedComponentProps & Compone...'.

75       :alt="alt"
          ~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Breadcrumb.vue:100:23 - error TS2353: Object literal may only specify known properties, and '"aria-label"' does not exist in type 'Partial<{ asChild: boolean; as: Component | AsTag; }> & Omit<{ readonly as: Component | AsTag; readonly asChild: boolean; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "as" | "asChild">'.

100   <Primitive :as="as" aria-label="breadcrumb" :class="ui.root({ class: [props.class, props.ui?.root] })">
                          ~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Breadcrumb.vue:105:54 - error TS2353: Object literal may only specify known properties, and '"aria-current"' does not exist in type '{ readonly as?: string | undefined; readonly type?: string | undefined; readonly disabled?: boolean | undefined; readonly onClick?: ((e: MouseEvent) => void | Promise<void>) | ((e: MouseEvent) => void | Promise<...>)[] | undefined; ... 4 more ...; readonly isExternal?: boolean | undefined; } & VNodeProps & AllowedCo...'.

105             <ULinkBase v-bind="slotProps" as="span" :aria-current="active && (index === items!.length - 1) ? 'page' : undefined" :class="ui.link({ class: [props.ui?.link, item.class], active: index === items!.length - 1, disabled: !!item.disabled, to: !!item.to })">
                                                         ~~~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Carousel.vue:282:11 - error TS2353: Object literal may only specify known properties, and '"aria-label"' does not exist in type '{ readonly label?: string | undefined; readonly color?: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral" | undefined; readonly variant?: "link" | "solid" | ... 4 more ... | undefined; ... 36 more ...; readonly inactiveClass?: string | undefined; } & VNodeProps & AllowedComponentProps & ...'.

282           aria-label="Prev"
              ~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Carousel.vue:293:11 - error TS2353: Object literal may only specify known properties, and '"aria-label"' does not exist in type '{ readonly label?: string | undefined; readonly color?: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral" | undefined; readonly variant?: "link" | "solid" | ... 4 more ... | undefined; ... 36 more ...; readonly inactiveClass?: string | undefined; } & VNodeProps & AllowedComponentProps & ...'.

293           aria-label="Next"
              ~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/CommandPalette.vue:248:15 - error TS2353: Object literal may only specify known properties, and '"aria-label"' does not exist in type '{ readonly label?: string | undefined; readonly color?: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral" | undefined; readonly variant?: "link" | "solid" | ... 4 more ... | undefined; ... 36 more ...; readonly inactiveClass?: string | undefined; } & VNodeProps & AllowedComponentProps & ...'.

248               aria-label="Close"
                  ~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/ContextMenuContent.vue:94:15 - error TS2353: Object literal may only specify known properties, and 'type' does not exist in type 'Partial<{}> & Omit<{ readonly as?: Component | AsTag | undefined; readonly asChild?: boolean | undefined; readonly disabled?: boolean | undefined; readonly textValue?: string | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>'.

94               type="button"
                 ~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/DropdownMenuContent.vue:100:15 - error TS2353: Object literal may only specify known properties, and 'type' does not exist in type 'Partial<{}> & Omit<{ readonly as?: Component | AsTag | undefined; readonly asChild?: boolean | undefined; readonly disabled?: boolean | undefined; readonly textValue?: string | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>'.

100               type="button"
                  ~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/InputMenu.vue:262:6 - error TS2353: Object literal may only specify known properties, and 'id' does not exist in type '{ "onUpdate:open"?: ((value: boolean) => any) | undefined; "onUpdate:modelValue"?: ((value: AcceptableValue) => any) | undefined; "onUpdate:searchTerm"?: ((value: string) => any) | undefined; ... 15 more ...; as?: AsTag | ... 1 more ... | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps'.

262     :id="id"
         ~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/InputMenu.vue:274:6 - error TS2353: Object literal may only specify known properties, and 'onKeydown' does not exist in type 'NonNullable<{ "onUpdate:open"?: ((value: boolean) => any) | undefined; "onUpdate:modelValue"?: ((value: AcceptableValue) => any) | undefined; "onUpdate:searchTerm"?: ((value: string) => any) | undefined; ... 15 more ...; as?: AsTag | ... 1 more ... | undefined; } & VNodeProps & AllowedComponentProps & ComponentCusto...'.

274     @keydown.enter="$event.preventDefault()"
         ~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/InputMenu.vue:284:10 - error TS2353: Object literal may only specify known properties, and 'onBlur' does not exist in type 'NonNullable<{ onInvalid?: ((payload: string) => any) | undefined; "onUpdate:modelValue"?: ((payload: string[]) => any) | undefined; modelValue?: string[] | undefined; defaultValue?: string[] | undefined; ... 14 more ...; as?: AsTag | ... 1 more ... | undefined; } & VNodeProps & AllowedComponentProps & ComponentCusto...'.

284         @blur="onBlur"
             ~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/InputMenu.vue:285:10 - error TS2353: Object literal may only specify known properties, and 'onFocus' does not exist in type 'NonNullable<{ onInvalid?: ((payload: string) => any) | undefined; "onUpdate:modelValue"?: ((payload: string[]) => any) | undefined; modelValue?: string[] | undefined; defaultValue?: string[] | undefined; ... 14 more ...; as?: AsTag | ... 1 more ... | undefined; } & VNodeProps & AllowedComponentProps & ComponentCusto...'.

285         @focus="onFocus"
             ~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/InputMenu.vue:294:97 - error TS2353: Object literal may only specify known properties, and 'disabled' does not exist in type 'Partial<{ as: AsTag | Component<any, any, any, ComputedOptions, MethodOptions, {}, any>; }> & Omit<{ readonly as: Component | AsTag; readonly asChild?: boolean | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "as">'.

294           <TagsInputItemDelete :class="ui.tagsItemDelete({ class: props.ui?.tagsItemDelete })" :disabled="disabled">
                                                                                                    ~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/InputMenu.vue:306:14 - error TS2353: Object literal may only specify known properties, and 'required' does not exist in type 'Partial<{ as: AsTag | Component<any, any, any, ComputedOptions, MethodOptions, {}, any>; }> & Omit<{ readonly as: Component | AsTag; readonly asChild?: boolean | undefined; readonly placeholder?: string | undefined; readonly autoFocus?: boolean | undefined; readonly maxLength?: number | undefined; } & VNodeProps & A...'.

306             :required="required"
                 ~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/InputMenu.vue:318:10 - error TS2353: Object literal may only specify known properties, and 'placeholder' does not exist in type 'Partial<{ type: string; as: AsTag | Component<any, any, any, ComputedOptions, MethodOptions, {}, any>; }> & Omit<...>'.

318         :placeholder="placeholder"
             ~~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/LinkBase.vue:57:6 - error TS2345: Argument of type '{ rel: string | undefined; target: string | undefined; as: "a"; href: string | undefined; 'aria-disabled': string | undefined; role: string | undefined; tabindex: number | undefined; onClick: any; } | { ...; } | { ...; }' is not assignable to parameter of type 'Partial<{ asChild: boolean; as: Component | AsTag; }> & Omit<{ readonly as: Component | AsTag; readonly asChild: boolean; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "as" | "asChild">'.
  Object literal may only specify known properties, and 'rel' does not exist in type 'Partial<{ asChild: boolean; as: Component | AsTag; }> & Omit<{ readonly as: Component | AsTag; readonly asChild: boolean; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "as" | "asChild">'.

57     :rel="rel"
        ~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Modal.vue:146:21 - error TS2353: Object literal may only specify known properties, and '"aria-label"' does not exist in type '{ readonly label?: string | undefined; readonly color?: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral" | undefined; readonly variant?: "link" | "solid" | ... 4 more ... | undefined; ... 36 more ...; readonly inactiveClass?: string | undefined; } & VNodeProps & AllowedComponentProps & ...'.

146                     aria-label="Close"
                        ~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/NavigationMenu.vue:202:43 - error TS2561: Object literal may only specify known properties, but 'dataOrientation' does not exist in type 'Partial<{ as: AsTag | Component<any, any, any, ComputedOptions, MethodOptions, {}, any>; modelValue: string; orientation: Orientation; delayDuration: number; skipDelayDuration: number; disableClickTrigger: boolean; disableHoverTrigger: boolean; }> & Omit<...>'. Did you mean to write 'orientation'?

202   <NavigationMenuRoot v-bind="rootProps" :data-orientation="orientation" :class="ui.root({ class: [props.class, props.ui?.root] })">
                                              ~~~~~~~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Pagination.vue:163:54 - error TS2353: Object literal may only specify known properties, and 'index' does not exist in type 'Partial<{}> & Omit<{ readonly as?: Component | AsTag | undefined; readonly asChild?: boolean | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>'.

163         <PaginationEllipsis v-else :key="item.type" :index="index" as-child>
                                                         ~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/RadioGroup.vue:142:6 - error TS2353: Object literal may only specify known properties, and 'id' does not exist in type 'Partial<{ disabled: boolean; loop: boolean; required: boolean; orientation: DataOrientation; }> & Omit<{ readonly disabled: boolean; readonly required: boolean; ... 8 more ...; "onUpdate:modelValue"?: ((payload: string) => any) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "orientation"...'.

142     :id="id"
         ~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Select.vue:171:6 - error TS2353: Object literal may only specify known properties, and 'id' does not exist in type 'Partial<{ defaultValue: string; open: boolean; modelValue: string; }> & Omit<{ readonly defaultValue: string; readonly name?: string | undefined; readonly disabled?: boolean | undefined; ... 7 more ...; "onUpdate:modelValue"?: ((value: string) => any) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCu...'.

171     :id="id"
         ~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/SelectMenu.vue:228:6 - error TS2353: Object literal may only specify known properties, and 'id' does not exist in type '{ "onUpdate:open"?: ((value: boolean) => any) | undefined; "onUpdate:modelValue"?: ((value: T) => any) | undefined; "onUpdate:searchTerm"?: ((value: string) => any) | undefined; "onUpdate:selectedValue"?: ((value: T | undefined) => any) | undefined; ... 14 more ...; as?: AsTag | ... 1 more ... | undefined; } & VNode...'.

228     :id="id"
         ~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/SelectMenu.vue:241:83 - error TS2353: Object literal may only specify known properties, and 'tabindex' does not exist in type 'Partial<{ as: AsTag | Component<any, any, any, ComputedOptions, MethodOptions, {}, any>; }> & Omit<{ readonly as: Component | AsTag; readonly asChild?: boolean | undefined; readonly disabled?: boolean | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, "as">'.

241       <ComboboxTrigger :class="ui.base({ class: [props.class, props.ui?.base] })" tabindex="0">
                                                                                      ~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/SelectMenu.vue:272:11 - error TS2561: Object literal may only specify known properties, but 'autofocus' does not exist in type 'Partial<{ type: string; as: AsTag | Component<any, any, any, ComputedOptions, MethodOptions, {}, any>; }> & Omit<...>'. Did you mean to write 'autoFocus'?

272           autofocus
              ~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Slideover.vue:121:23 - error TS2353: Object literal may only specify known properties, and 'dataSide' does not exist in type 'Partial<{}> & Omit<{ readonly as?: Component | AsTag | undefined; readonly asChild?: boolean | undefined; readonly forceMount?: boolean | undefined; ... 7 more ...; onCloseAutoFocus?: ((event: Event) => any) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>'.

121       <DialogContent :data-side="side" :class="ui.content({ class: [props.class, props.ui?.content] })" v-bind="contentProps" v-on="contentEvents">
                          ~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Slideover.vue:145:21 - error TS2353: Object literal may only specify known properties, and '"aria-label"' does not exist in type '{ readonly label?: string | undefined; readonly color?: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral" | undefined; readonly variant?: "link" | "solid" | ... 4 more ... | undefined; ... 36 more ...; readonly inactiveClass?: string | undefined; } & VNodeProps & AllowedComponentProps & ...'.

145                     aria-label="Close"
                        ~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Slider.vue:98:6 - error TS2353: Object literal may only specify known properties, and 'id' does not exist in type 'Partial<{ defaultValue: number[]; disabled: boolean; orientation: DataOrientation; step: number; max: number; min: number; inverted: boolean; minStepsBetweenThumbs: number; }> & Omit<...>'.

98     :id="id"
        ~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Table.vue:198:14 - error TS2353: Object literal may only specify known properties, and '"data-pinned"' does not exist in type 'ThHTMLAttributes & ReservedProps'.

198             :data-pinned="header.column.getIsPinned()"
                 ~~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Table.vue:211:18 - error TS2353: Object literal may only specify known properties, and '"data-selected"' does not exist in type 'HTMLAttributes & ReservedProps'.

211             <tr :data-selected="row.getIsSelected()" :data-expanded="row.getIsExpanded()" :class="ui.tr({ class: [props.ui?.tr] })">
                     ~~~~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Table.vue:215:18 - error TS2353: Object literal may only specify known properties, and '"data-pinned"' does not exist in type 'TdHTMLAttributes & ReservedProps'.

215                 :data-pinned="cell.column.getIsPinned()"
                     ~~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Toast.vue:154:13 - error TS2353: Object literal may only specify known properties, and '"aria-label"' does not exist in type '{ readonly label?: string | undefined; readonly color?: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral" | undefined; readonly variant?: "link" | "solid" | ... 4 more ... | undefined; ... 36 more ...; readonly inactiveClass?: string | undefined; } & VNodeProps & AllowedComponentProps & ...'.

154             aria-label="Close"
                ~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Toaster.vue:106:8 - error TS2353: Object literal may only specify known properties, and 'dataExpanded' does not exist in type '{ readonly as?: any; readonly title?: string | undefined; readonly description?: string | undefined; readonly icon?: string | undefined; readonly avatar?: AvatarProps | undefined; ... 17 more ...; readonly onSwipeEnd?: ((event: SwipeEvent) => any) | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustom...'.

106       :data-expanded="expanded"
           ~~~~~~~~~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Toaster.vue:120:8 - error TS2353: Object literal may only specify known properties, and 'onClick' does not exist in type 'NonNullable<{ readonly as?: any; readonly title?: string | undefined; readonly description?: string | undefined; readonly icon?: string | undefined; readonly avatar?: AvatarProps | undefined; ... 17 more ...; readonly onSwipeEnd?: ((event: SwipeEvent) => any) | undefined; } & VNodeProps & AllowedComponentProps & Com...'.

120       @click="toast.click && toast.click(toast)"
           ~~~~~

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_ioredis@5._ijev2tcjydqcdikviydmvhkbzq/node_modules/@nuxt/ui/dist/runtime/components/Toaster.vue:124:8 - error TS2353: Object literal may only specify known properties, and 'dataExpanded' does not exist in type 'Partial<{ label: string | ((hotkey: string) => string); as: AsTag | Component<any, any, any, ComputedOptions, MethodOptions, {}, any>; hotkey: string[]; }> & Omit<...>'.

124       :data-expanded="expanded"
           ~~~~~~~~~~~~~


Found 35 errors in 20 files.

Additional context

No response

Logs

No response

@some-user123 some-user123 added bug Something isn't working triage v3 #1289 labels Nov 7, 2024
@hywax
Copy link
Contributor

hywax commented Nov 8, 2024

Add the node_modules folder to ignore. You should not go inside the libraries.

@some-user123
Copy link
Author

nuxt autogenerates .nuxt/tsconfig.json which contains both includes and excludes. Excerpt:

  "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 tsconfig.json or the removal of the type errors.

@benjamincanac
Copy link
Member

Why do you use the strictTemplates option exactly? I can't find any documentation about this. Also, the errors mentioned don't seem to be easily fixable. If we have to type aria-label or any other html attribute on every component we'll still be there last year. Have you tried with Radix Vue only? I'm pretty sure it will do the same thing.

Since you just want to rely on the generated tsconfig.json from nuxt, why override it?

@some-user123
Copy link
Author

Why do you use the strictTemplates option exactly?

strictTemplates basically enables type safety for templates. So, things we are used to in Type Script are getting applied and available in the template section as well, i.e.: You cannot access unknown properties.

In script you get complaints if you're accessing invalid properties:
Image

Property 'len' does not exist on type 'string'.

That avoids typing mistakes, helps you identify properties that aren't valid any more because the interface changed etc.

With strictTemplates you get the same in the template as well:

Image

Object literal may only specify known properties, and 'len' does not exist in type 'InputHTMLAttributes & ReservedProps'.

If we have to type aria-label or any other html attribute on every component we'll still be there last year.

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.

Have you tried with Radix Vue only?

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.

Since you just want to rely on the generated tsconfig.json from nuxt, why override it?

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 strictTemplates the autogenerated config neither enables nor disables it. Unlike the paths.

@xmatthias
Copy link

I'm getting the same with nuxtUI 3 - a range of type errors (e.g. the following):

node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/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<T>; 'item-leading': SlotProps<T>; 'item-label': SlotProps<T>; 'item-trailing': SlotProps<T>; } & Record<string, SlotProps<...>> & (T["slot"] extends string ? Record<...> : Record<...>))[string] & SlotProps<...> extends (props: infer P) => any ? P : {}'.

187               <slot :name="item.slot ? `${item.slot}-trailing`: 'item-trailing'" v-bind="{ item, index, level, expanded: isExpanded, selected: isSelected }">
                

Found 51 errors in 13 files.


   5  node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime/components/Accordion.vue:102
     5  node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime/components/Breadcrumb.vue:89
     6  node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime/components/CommandPalette.vue:264
     1  node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime/components/ContextMenu.vue:126
     5  node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime/components/ContextMenuContent.vue:65
     1  node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime/components/DropdownMenu.vue:136
     5  node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime/components/DropdownMenuContent.vue:71
     5  node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime/components/NavigationMenu.vue:195
     3  node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime/components/Stepper.vue:144
     6  node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime/components/Table.vue:312
     4  node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime/components/Tabs.vue:115
     4  node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected]_ioredis_7k4dthjdolclbo2mry4hrzxrzm/node_modules/@nuxt/ui/dist/runtime/components/Tree.vue:166

my (explicit) tsconfig.json is just the following - which i think is the default for nuxt.
There's nothing explicit about strictTemplates - though i think my templates should be checked - but not necessarily the ones in node_modules.

{
  "extends": "./.nuxt/tsconfig.json"
}

in .nuxt/tsconfig.json however, i've got the following (which is autogenerated, obviously).

{ 
...
  "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",
    ".."
  ],
//...
}

@SoCuul
Copy link

SoCuul commented Mar 18, 2025

Same here. Struggling to fix this.

@EmanueleDB
Copy link

Hi,
I have the same problem when running vue-tsc

`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
`
50 errors like this

@Norbiros
Copy link
Contributor

Related to #3405 and thus #3331

@IliasPavlakos
Copy link

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 μ.μ. 

@benjamincanac
Copy link
Member

Closing this as it seems to have been fixed already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v3 #1289
Projects
None yet
Development

No branches or pull requests

8 participants