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
When migrating a component from Svelte 4 to 5, JSDoc annotations that were above the export let props aren't found in interface Props.
export let
interface Props
Before
<script lang="ts"> /** Total clicks */ export let count = 0; /** Background color for button */ export let backgroundColor = 'blue'; /** Binding to button element */ export let button: HTMLButtonElement /** Dispatches click to button element */ export function dispatchClick() { button.dispatchEvent(new MouseEvent('click')); } </script> <button on:click={() => count++} style="background-color: {backgroundColor}" bind:this={button}> clicks: {count} </button>
After
<script lang="ts"> /** Total clicks */ /** Background color for button */ /** Binding to button element */ interface Props { count?: number, backgroundColor?: string, button: HTMLButtonElement } let { count = $bindable(0), backgroundColor = 'blue', button = $bindable() }: Props = $props(); /** Dispatches click to button element */ export function dispatchClick() { button.dispatchEvent(new MouseEvent('click')); } </script> <button onclick={() => count++} style="background-color: {backgroundColor}" bind:this={button}> clicks: {count} </button>
Expected
<script lang="ts"> interface Props { /** Total clicks */ count?: number, /** Background color for button */ backgroundColor?: string, /** Binding to button element */ button: HTMLButtonElement } let { count = $bindable(0), backgroundColor = 'blue', button = $bindable() }: Props = $props(); /** Dispatches click to button element */ export function dispatchClick() { button.dispatchEvent(new MouseEvent('click')); } </script> <button onclick={() => count++} style="background-color: {backgroundColor}" bind:this={button}> clicks: {count} </button>
Link to Svelte 5 Repro - Click MIGRATE
No response
Using svelte 5 preview MIGRATE feature
annoyance
The text was updated successfully, but these errors were encountered:
dummdidumm
No branches or pull requests
Describe the bug
When migrating a component from Svelte 4 to 5, JSDoc annotations that were above the
export let
props aren't found ininterface Props
.Before
After
Expected
Reproduction
Link to Svelte 5 Repro - Click MIGRATE
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: