Skip to content

Syntax Error when using "break $" #559

@j3rem1e

Description

@j3rem1e

Describe the bug

In svelte, the syntax break $ is used to escape a reactive block (sveltejs/svelte#2828).
However, in VSCode, using this syntax shows an error "Expression expected // ; Expected".

"break $" is transformed by svelte2tsx to :
"break __sveltets_store_get();" which is not a valid syntax

To Reproduce

<script>
  $: { break $; }
</script>

Expected behavior

The previous code should be valid in vscode.

System (please complete the following information):

  • OS: Windows 10
  • IDE: VSCode
  • Plugin/Package:

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions