-
-
Notifications
You must be signed in to change notification settings - Fork 212
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
There's no svelte-check
error when binding to a property if the property is a broader type.
To Reproduce
<script lang="ts">
import MyComponent from './MyComponent.svelte'
let value: Date
$: console.log('value:', value)
</script>
<MyComponent bind:value />
MyComponent.svelte:
<script lang="ts">
export let value: Date | null = null
</script>
{JSON.stringify(value)}
Expected behavior
There should be a type error because value
is defined as Date
even though it can also be null
System
- OS: macOS
- IDE: VSCode
- Plugin/Package: "Svelte for VSCode",
svelte-check
,svelte2tsx
seancolsen, mlkauppila, KiddoV, paologaleotti and Malix-Labs
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working