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
When I use a generic type as an argument to a snippet, svelte-package does not properly generate a Component.d.ts file for my component anymore.
While I understand the following test case is a bit weird, I do have several components where I use the type of one of the properties to determine the type that is passed to subsequent snippets.
I found other cases where types are not generated anymore. There also seems to be an issue using ComponentProps for components that have a Snippet on their props. For example the following causes the outer component to not generate types anymore.
Investigating this. For some reason TypeScript seems to want to unpack the types when using the ComponentProps type, likely because of the infer used in there. That in combination with the generated d.ts output of the default export of components leads to TS breaking down somewhere. This not only happens for Snippet, it can happen for other imported types, too.
Not sure what a good fix could be yet.
Describe the bug
When I use a generic type as an argument to a snippet, svelte-package does not properly generate a Component.d.ts file for my component anymore.
While I understand the following test case is a bit weird, I do have several components where I use the type of one of the properties to determine the type that is passed to subsequent snippets.
Reproduction
Logs
No response
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: