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
Given how narrowing and generics interact today, we don't have any way to represent the type of props.icon in the else branch without negated types; see #29317
Bug Report
π Search Terms
Typeguard else not working
Type guard not working
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
I get an error:
π Expected behavior
There shouldn't be an error because according to the docs typescript should know that when the type guard returns false
icon
is of typeSolidIcon
.The text was updated successfully, but these errors were encountered: