Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/five-suns-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': patch
---

fix: don't show `state_referenced_locally` warning on types
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ const visitors = {
TSNonNullExpression(node, context) {
return context.visit(node.expression);
},
TSTypeAnnotation() {
return b.empty;
},
TSInterfaceDeclaration() {
return b.empty;
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<script lang="ts">
let { a }: { a: string } = $state({});
let { b }: { b: string } = $derived(a);
</script>

<button onclick={()=>a++}></button>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]