refactor: add types to svelte components to pleasure svelte-check

This commit is contained in:
Marcin Wiśniowski 2025-02-17 10:53:00 +01:00
parent cbcc65c0b6
commit 893056627e
4 changed files with 5 additions and 3 deletions

View file

@ -1,4 +1,5 @@
<script>
/** @type {{title: string, onsubmit: (msg: string) => void}} */
const { title, onsubmit } = $props();
</script>

View file

@ -1,5 +1,6 @@
<script>
import { update, remountCount } from '../store'
/** @type {{count: number; onsubmit: (msg: string) => void; main?: import("svelte").Snippet; children?: import("svelte").Snippet}} */
const { count, onsubmit, main, children } = $props()
update();
</script>

View file

@ -1,4 +1,5 @@
<script>
/** @type {{children?: import("svelte").Snippet}} */
const {children} = $props()
</script>

View file

@ -1,7 +1,6 @@
<script>
const {header, main, footer} = $props()
console.log({header, main, footer});
/** @type {{header?: import("svelte").Snippet, main?: import("svelte").Snippet, footer?: import("svelte").Snippet}} */
const {header, main, footer} = $props()
</script>
<div>