Skip to content

VSCode suggestions are too broad with Svelte extension #2168

@bitkidd

Description

@bitkidd

Describe the bug

For some reason Svelte to VSCode extension does not provide optimal TS experience in terms of suggestions, sometimes I get too many of them, sometimes none. I narrowed down the issue to round braces, so if some value is inside of them, suggestions do not work, if not, work okay.

Reproduction

Here suggestions do not work for me.

<script lang="ts">
  const someFunction = (input: string) => input

  export let data: { title: string; excerpt?: string } | null = null
</script>

{#if data}
  <h1>{someFunction(data.title)}</h1> <!-- Here suggestions after . do not work -->
  <p>{data.excerpt}</p>
{/if}

Expected behaviour

Suggestions that are strictly tied to the data type provided in script tag.

System Info

  • OS: MacOS 13.6
  • IDE: VSCode 1.82.2

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

Screenshot 2023-09-25 at 15 05 59

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglimitationConstraints of the existing architecture make this hard to fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions