Skip to content
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

[Svelte 4] Invalid <ValidationMessage> Component types (@felte/reporter-svelte) #245

Closed
TimoWilhelm opened this issue Jun 22, 2023 · 0 comments · Fixed by #246
Closed

[Svelte 4] Invalid <ValidationMessage> Component types (@felte/reporter-svelte) #245

TimoWilhelm opened this issue Jun 22, 2023 · 0 comments · Fixed by #246
Assignees
Labels
bug Something isn't working

Comments

@TimoWilhelm
Copy link
Contributor

TimoWilhelm commented Jun 22, 2023

Describe the bug

The base type of ValidationMessage (SvelteComponentTyped) is deprecated in Svelte 4.
See PR for more information: sveltejs/svelte#8512

Which package/s are you using?

felte (Svelte), @felte/reporter-svelte, @felte/validator-zod

Environment

"svelte": "^4.0.0",
"felte": "1.2.10",
"@felte/reporter-svelte": "1.1.8",
"@felte/validator-zod": "1.0.16",

To reproduce

1: Use <ValidationMessage> in <form>
2: Run svelte-check

Small reproduction example

No response

Screenshots

No response

Additional context

Argument of type 'typeof ValidationMessage' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent'.
  Types of construct signatures are incompatible.
    Type 'new (options: ComponentConstructorOptions<ValidationMessageProps>) => ValidationMessage' is not assignable to type 'new (args: { target: any; props?: any; }) => ATypedSvelteComponent'.
      Construct signature return types 'ValidationMessage' and 'ATypedSvelteComponent' are incompatible.
        The types of '$on' are incompatible between these types.
          Type '<K extends string>(type: K, callback: (e: never) => void) => () => void' is not assignable to type '(event: string, handler: ((e: any) => any) | null | undefined) => () => void'.
            Types of parameters 'callback' and 'handler' are incompatible.
              Type '((e: any) => any) | null | undefined' is not assignable to type '(e: never) => void'.
                Type 'undefined' is not assignable to type '(e: never) => void'.
@TimoWilhelm TimoWilhelm added the bug Something isn't working label Jun 22, 2023
@TimoWilhelm TimoWilhelm changed the title [Svelte 4] Invalid ValidationMessage types [Svelte 4] Invalid <ValidationMessage> Component types (@felte/reporter-svelte) Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants