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