Describe the bug
When using typeof <value> in a generic and that value happens to be something stateful ($state/$derived). The Svelte LSP will warn you about it being referenced locally even though that doesn't apply with generic types.
Reproduction
let count = $state(0);
type Count = typeof count; // Works as expected
function foo<T>() {}
foo<typeof count>(); // Unexpected warning

Expected behaviour
State referenced with typeof in a generic expression should not warn me about locally referenced state
System Info
Which package is the issue about?
svelte-language-server, Svelte for VS Code extension
Additional Information, eg. Screenshots
I think the issue is in the language server but since I'm using it through the VSCode extension I flagged it as a VSCode extension issue, feel free to adjust it accordingly.