You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the update to Svelte 5, the type signature for base Svelte components is a function rather than a class. See this paragraph for details.
This means that when trying to pass Carbon Icons as a prop/field in an object, they cannot be typed correctly, as the Carbon icons extend from CarbonIcon which descends from the deprecated SvelteComponentTyped.
The suggested approach is to change the typing of each generated icon from:
Hello, thank you for reporting this, with a detailed repro and docs source.
I think it makes sense to move away from SvelteComponentTyped. I'll triage this and see if the const Component approach is backwards-compatible (it should be).
Hi,
With the update to Svelte 5, the type signature for base Svelte components is a function rather than a class. See this paragraph for details.
This means that when trying to pass Carbon Icons as a prop/field in an object, they cannot be typed correctly, as the Carbon icons extend from
CarbonIcon
which descends from the deprecatedSvelteComponentTyped
.The suggested approach is to change the typing of each generated icon from:
to
This ensures that the correct typings are inferred.
Not sure the best way of including this sort of typing. I've generally only used Svelte's automatic typing in the past.
Kind regards,
James
The text was updated successfully, but these errors were encountered: