You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This reverts commit 8c080cf.
This reverts #2477. Sadly, the idea didn't work out, as shown by two opened bug reports:
- #2506: A type union can be narrowed on the input, but not on the way back out
- #2494: A generic nested within a bound value is not properly resolved and not falling back to `any` (in #2477 we thought of the generic case, but only for when the generic is the whole value type, not when it's nested)
For these reasons I don't see a way to properly implement #1392 at the moment.
Describe the bug
bind:
does not respect discriminated unions and merges the possible types into one.Likely introduced here? #2477
Reproduction
https://github.com/huntabyte/disc-union-repro
Expected behaviour
Respect discriminated unions.
System Info
Which package is the issue about?
Svelte for VS Code extension, svelte-language-server, svelte2tsx, svelte-check
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered: