<script lang="ts">
import '../app.css';
let { children } = $props();
import Button, { Label } from '@smui/button';
</script>
<Button>
<Label>sss</Label>
</Button>
{@render children()}
I get error:
Type '{ children: () => any; }' is not assignable to type 'Record<string, never> & { children?: any; }'.
Type '{ children: () => any; }' is not assignable to type 'Record<string, never>'.
Property 'children' is incompatible with index signature.
Type '() => any' is not assignable to type 'never'.ts(2322)
Describe the bug
When using
Button
like this:I get error:
To Reproduce
pnpx sv create --template minimal --types ts svelte5_smui8_demo
eslint
+tailwindcss
pnpm
pnpm add --save-dev @smui/button@8.0.0-beta.0
pnpm add --save-dev smui-theme@8.0.0-beta.0
Button
and use it like aboveUpdate: I just checked that enabling the typescript plugin or not does not make a difference.
Expected behavior
No typescript error occurs.
Screenshots
Desktop (please complete the following information):
Additional context
A small reproduction, the
Button
is used insrc/routes/+layout.svelte
svelte5_smui8_demo.zip