Open HighFunctioningSociopathSH opened 2 months ago
When using a generic in a component, vscode suggestion list only shows the default value of the generic instead of what it extends.
Test.svelte
<script lang="ts" generics="Element extends keyof HTMLElementTagNameMap = 'div'"> let { element, ...restProps }: { element?: Element } = $props(); </script>
+page.svelte
<script lang="ts"> import Test from "$components/Test/Test.svelte"; </script> <Test element=""></Test>
Here's what it's supposed to suggest: Test.svelte
<script lang="ts" generics="Element extends keyof HTMLElementTagNameMap"> let { element, ...restProps }: { element?: Element } = $props(); </script>
When using the above code the following result is shown.
Svelte for VS Code extension
No response
Upstream issue https://github.com/microsoft/TypeScript/issues/52516
Describe the bug
When using a generic in a component, vscode suggestion list only shows the default value of the generic instead of what it extends.
Reproduction
Test.svelte
+page.svelte
Expected behaviour
Here's what it's supposed to suggest: Test.svelte
+page.svelte
When using the above code the following result is shown.![image](https://github.com/sveltejs/language-tools/assets/48864418/9e00710a-51b2-4304-8762-f5ae98b3fc68)
System Info
Which package is the issue about?
Svelte for VS Code extension
Additional Information, eg. Screenshots
No response