Skip to content

Conflicting type and usage for useForm->errors #177

Open
@mpressen

Description

@mpressen

in /node_modules/@inertiajs/react/types/useForm.d.ts we can see that :
errors: Partial<Record<keyof TForm, string>>

But in the docs, we have this usage :
redirect_to new_user_url, inertia: { errors: user.errors }

which actually create errors with type Partial<Record<keyof TForm, string[]>> instead.

Should we do something about it ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions