Skip to content

Typecheck failed: @submit of <AuthForm> <Form> , Target signature provides too few arguments #6814

Description

@typed-sigterm

Environment

Operating system Windows 10.0.26200
CPU Intel(R) Core(TM) Ultra 5 225H (14 cores)
Node.js version v24.18.0
nuxt/cli version 3.37.0
Package manager bun@1.3.14
Nuxt version 4.5.2
Nitro version 2.13.4
Builder vite@8.2.1
Config app, compatibilityDate, css, fonts, icon, modules
Modules @nuxt/ui@4.10.0

Is this bug related to Nuxt or Vue?

Nuxt

Package

v4.x

Version

v4.10.0

Reproduction

N/A - it works in StackBlitz? idk

Description

app/pages/login.vue:70:8 - error TS2322: Type '(payload: FormSubmitEvent<{ email: string; password: string; rememberMe: boolean; }>) => Promise<void>' is not assignable to type '(((() => void) | ((event: FormSubmitEvent<{ email: string; password: string; rememberMe: boolean; }>) => void)) & ((payload: FormSubmitEvent<{ email: string; password: string; rememberMe?: boolean | undefined; }>) => any)) | undefined'.
  Type '(payload: FormSubmitEvent<{ email: string; password: string; rememberMe: boolean; }>) => Promise<void>' is not assignable to type '(() => void) & ((payload: FormSubmitEvent<{ email: string; password: string; rememberMe?: boolean | undefined; }>) => any)'.
    Type '(payload: FormSubmitEvent<{ email: string; password: string; rememberMe: boolean; }>) => Promise<void>' is not assignable to type '() => void'.
      Target signature provides too few arguments. Expected 1 or more, but got 0.

70       @submit="onSubmit"
          ~~~~~~

  node_modules/.bun/@nuxt+ui@4.10.0+53c4fa4b58ab7d90/node_modules/@nuxt/ui/dist/runtime/components/AuthForm.d.vue.ts:80:5
    80     onSubmit?: FormProps<T>['onSubmit'];
           ~~~~~~~~
    The expected type comes from property 'onSubmit' which is declared here on type 'NonNullable<VNodeProps & AllowedComponentProps & ComponentCustomProps & { as?: any; icon?: any; title?: string | undefined; description?: string | undefined; ... 21 more ...; novalidate?: Booleanish | undefined; } & Record<...>>'

https://npmx.dev/package-code/@nuxt/ui/v/4.10.0/dist%2Fruntime%2Fcomponents%2FForm.d.vue.ts#L54

    onSubmit?: ((event: FormSubmitEvent<FormData<S, T>>) => void) | (() => void);
//                                                                  ^^^^^^^^^^^^

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageAwaiting initial review and prioritization

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions