Skip to content

ValidationMessage should be a SvelteComponentTyped #299

Description

@gl-aagostino

Describe the bug

I started receiving this error upon using ValidationMessage

Argument of type 'typeof ValidationMessage' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent'.
  Type 'typeof ValidationMessage' provides no match for the signature 'new (args: { target: any; props?: any; }): ATypedSvelteComponent'.

Possible causes:
- You use the instance type of a component where you should use the constructor type
- Type definitions are missing for this Svelte Component. If you are using Svelte 3.31+, use SvelteComponentTyped to add a definition:
  import type { SvelteComponentTyped } from "svelte";
  class ComponentName extends SvelteComponentTyped<{propertyName: string;}> {}ts(2345)

I think it can be fixed by changing this

export default class ValidationMessage extends SvelteComponent

to this

export default class ValidationMessage extends SvelteComponentTyped

Which package/s are you using?

@felte/reporter-svelte

Environment

  • OS:
  • Browser:
  • Version:

To reproduce

No response

Small reproduction example

No response

Screenshots

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions