Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(fix) no error with unkown props if uses $$props #1769

merged 3 commits into from
Dec 9, 2022


Copy link

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'
<Component2 class="abc" />
<!--        ↑↑↑↑↑Type 'string' is not assignable to type 'never'.ts(2322) -->

Copy link

@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
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants