Skip to content

Commit

Permalink
[State] Improve typing
Browse files Browse the repository at this point in the history
  • Loading branch information
techniq committed Jun 3, 2024
1 parent 011982d commit b57e07a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/soft-trains-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-ux': patch
---

[State] Improve typing
6 changes: 4 additions & 2 deletions packages/svelte-ux/src/lib/components/State.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<script lang="ts">
export let initial: any = null;
type T = $$Generic;
export let initial: T | null = null;
let value = initial;
function set(newValue: any) {
function set(newValue: T) {
value = newValue;
}
</script>
Expand Down

0 comments on commit b57e07a

Please sign in to comment.