Does <Show> narrow types in typescript?
I am getting undefined errors even though I wrap it in a show block.
7 Replies
A plain
Show
won't narrow props because TS doesn't see Show
as a native way to eliminate types (compared to `if-else')
You can use Show's callback form thoughwithout a key?
not until 1.7
which is the upcoming release
got it thanks
Anyone know any good workarounds? Suppose you had some accessor for a union of 10-20.. different object types easily identifiable by one property.
thats exactly my usecase
gotta wait for 1.7 I guess
yea or beta I guess https://discord.com/channels/722131463138705510/1080497114561396826/1080537580342349834
might as well