Skip to content

Conversation

@jasonlyu123
Copy link
Member

Currently, unknown props show an error with type ... is not assignable to never when you use $$props and don't have any other props.

For example:

<!-- Component2.svelte -->
<div class={$$props.class}>
<script lang="ts">
import Component2 from './Component2.svelte'
</script>
<Component2 class="abc" />
<!--        ↑↑↑↑↑Type 'string' is not assignable to type 'never'.ts(2322) -->

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you!

@dummdidumm dummdidumm merged commit 162c16d into sveltejs:master Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants