Why this object is possibly null or undefined if it's in an else if?

I’m using the below code in a component: Box.svelte: <script lang="ts"> type T = $$Generic; export let loading = false; export let error = false; export let value: T | null | undefined = undefined; </script> <div> {#if loading} Loading… {:else if error} Error… {:else if value} <slot {value} /> {/if} </div> Using it like… Read More Why this object is possibly null or undefined if it's in an else if?