Skip to content

Svelte for VS Code 109.4.0 displays an incorrect error in the spread syntax for #each statement. #2636

@comman-fukui

Description

@comman-fukui

Describe the bug

{#each items as { propA, ...restProps }}
  {propA} {restProps}
{/each}

Svelte for VS Code version 109.4.0 shows an error when trying to get the properties of an array element with the above code.

Svelte-check shows no error.
Svelte for VS Code version 109.3.3 or earlier does not indicate an error.
I think there is a bug in version 109.4.0.

Reproduction

https://github.com/comman-fukui/issue-vscode-svelte-extension
Repository url for reproduction.
You can check it in the file src/routes/+page.svelte.

Expected behaviour

As with version 109.3.3, no errors are displayed.

System Info

  • OS: Ubuntu 22.04.5 LTS
  • IDE: VSCode 1.96.2

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstream

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions