We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
My relevant packages:
{ "@sveltejs/kit": "^2.3.2" "svelte": "5.0.0-next.246", "prettier": "^3.3.3", "prettier-plugin-svelte": "^3.2.6", }
When I have made a Snippet with typed arguments using an instance of a Class, the formatting fails and breaks the code.
Snippet
Example before format:
{#snippet priceListItemsTabContent(title: string, tableInstance: InstanceType<new () => TableHandler<PriceListItem, PriceListItem>>, entityStatus: string)}
After format:
{#snippet priceListItemsTabContent(title: string, tableInstance: InstanceType<new ()}
This causes the code after to break. I've also noticed it sometimes created duplicated rows of code, but I cant provide an example for that.
I could solve it however by adding line breaks OR extracting the type to the script, causing the formatting to be fine.
Example 1 solution
{#snippet priceListItemsTabContent( title: string, tableInstance: InstanceType<new () => TableHandler<PriceListItem, PriceListItem>>, entityStatus: string )}
Example 2 solution
<script lang="ts"> type TableHandlerPriceListItem = InstanceType<new () => TableHandler<PriceListItem, PriceListItem>>; // ... </script> {#snippet priceListItemsTabContent( title: string, tableInstance: TableHandlerPriceListItem, entityStatus: string )} <!-- or as one line --> {#snippet priceListItemsTabContent(title: string, tableInstance: TableHandlerPriceListItem, entityStatus: string)}
The text was updated successfully, but these errors were encountered:
Closing as duplicate of #455 (fixed, was released just now)
Sorry, something went wrong.
No branches or pull requests
My relevant packages:
When I have made a
Snippet
with typed arguments using an instance of a Class, the formatting fails and breaks the code.Example before format:
After format:
This causes the code after to break. I've also noticed it sometimes created duplicated rows of code, but I cant provide an example for that.
I could solve it however by adding line breaks OR extracting the type to the script, causing the formatting to be fine.
Example 1 solution
Example 2 solution
The text was updated successfully, but these errors were encountered: