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

Deprecated SvelteComponentTyped in Svelte 4 #190

Open
MoritzKronberger opened this issue Sep 20, 2024 · 1 comment
Open

Deprecated SvelteComponentTyped in Svelte 4 #190

MoritzKronberger opened this issue Sep 20, 2024 · 1 comment

Comments

@MoritzKronberger
Copy link

Using Svelte 4.2.7 with carbon-icons-svelte 12.11.0 and carbon-components-svelte 0.85.2 setting icons on carbon components raises errors such as:

Types of construct signatures are incompatible.
  Type 'new (options: ComponentConstructorOptions<CarbonIconProps>) => Asleep' is not assignable to type 'new <Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any>(options: ComponentConstructorOptions<Props>) => SvelteComponent<Props, Events, Slots>'.
    Construct signature return types 'Asleep' and 'SvelteComponent<Props, Events, Slots>' are incompatible.
      The types of '$$prop_def' are incompatible between these types.
        Type 'CarbonIconProps' is not assignable to type 'Props'.
          'CarbonIconProps' is assignable to the constraint of type 'Props', but 'Props' could be instantiated with a different subtype of constraint 'Record<string, any>'.ts(2419)

To me this looks like an issue of carbon icons being typed as SvelteComponentTyped which is now deprecated?

@metonym
Copy link
Collaborator

metonym commented Sep 25, 2024

This is unexpected. Could you first try restarting the Svelte Language Server in your IDE?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants