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
This is intentional. The component is a function in svelte 5 and the constructor signature is kept for compatibility. See sveltejs/svelte#11775 for the reasoning. Is there a specific reason why you don't want to see it or you just find that unexpected?
No, this is intentional for backwards compatibility as the linked issue explains. We want to output both so that people can use it both way. This will be removed once Svelte 4 syntax is no longer be usable in a future major version of Svelte.
Does this output cause any issues for you in practise? Or is it just that you're wondering why it's using a deprecated syntax?
Describe the bug
After running
pnpm package
, and checking a created svelte.d.ts file, it usesComponentConstructorOptions
with stroke line on VSCode.'ComponentConstructorOptions' is deprecated.ts(6385)
index.d.ts(3, 5): The declaration was marked as deprecated here.
Reproduction
Create a sample component,
lib/Mycompo.svelte
:In lib/index.ts:
Run
pnpm package
and checkdist/MyCompo.svelte.d.ts
Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: