Skip to content

Migration: $$slots with non valid identifier produces invalid JS #13467

Closed
@paoloricciuti

Description

@paoloricciuti

Describe the bug

{#if $$slots["non:valid:identifier"]}
	<slot name="non:valid:identifier" />
{/if}

get's migrated to

<script>
	/** @type {{non_valid_identifier?: import('svelte').Snippet}} */
	let { non_valid_identifier } = $props();
</script>

{#if "non:valid:identifier"]}
	{@render non_valid_identifier?.()}
{/if}

which is not valid

Reproduction

REPL

Logs

No response

System Info

-

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions