refactor: add types to svelte components to pleasure svelte-check
This commit is contained in:
parent
cbcc65c0b6
commit
893056627e
|
|
@ -1,4 +1,5 @@
|
|||
<script>
|
||||
/** @type {{title: string, onsubmit: (msg: string) => void}} */
|
||||
const { title, onsubmit } = $props();
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<script>
|
||||
/** @type {{children?: import("svelte").Snippet}} */
|
||||
const {children} = $props()
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue