language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

Svelte 5: Component Imports in TS files not behaving correctly

Open abdel-17 opened this issue 2 years ago • 0 comments

Describe the bug

If you try to import a Svelte component with a snippet in a TS file, the type is not inferred correctly.

Reproduction

// foo.ts
import Foo from "./Foo.svelte";
<!-- Foo.svelte -->
{#snippet foo()}
{/snippet}

Expected behaviour

The import should have the correct type.

https://github.com/sveltejs/language-tools/assets/88583085/95581db6-7a11-4419-975a-ad3db5ffa8a1

System Info

  • OS: MacOS 14.2.1
  • IDE: VSCode

Which package is the issue about?

No response

Additional Information, eg. Screenshots

No response

abdel-17 avatar Feb 21 '24 09:02 abdel-17