-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Description
Describe the problem
I'm not a fan of {...$$restProps} because:
-
if I'm creating a component I would like to handle the possible props
-
when using my custom component and I have a prop like
isDisabledand by mistake I usedisablednor my IDE nornpm run checkcan alert me about this error
So I would like to remove {...$$restProps} from my custom component even because the only need I have now is because I need to pass this:
<script lang="ts">
import Button from '$lib/Button.svelte';
export let stat = false;
</script>
<Button
on:click={() => something}
data-stat={stat ? 'something' : undefined}
>
Hello
</Button>Is there a way to allow in Button (my custom component) the data-* props?
Importance
would make my life easier