carbon-icons-svelte icon indicating copy to clipboard operation
carbon-icons-svelte copied to clipboard

Deprecated `SvelteComponentTyped` in Svelte 4

Open MoritzKronberger opened this issue 5 months ago • 1 comments

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?

MoritzKronberger avatar Sep 20 '24 07:09 MoritzKronberger