Skip to content

Svelte 5: Syntax error on snippets with inline typing with optional properties #12068

Closed
@7nik

Description

@7nik

Describe the bug

Syntax error on snippets with inline typing with optional properties.

<script lang="ts"></script>
{#snippet snip({a}: {a?: string})} <!-- Error: Expected token ) -->
  {a}
{/snippet}

Reproduction

REPL

Logs

No response

System Info

Svelte 5.0.0-next.157

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions