The next one is just basic straight up JavaScript by doing just a straight up truthy or falsy check. You should probably be cognizant of if perhaps you know values that can equate to falsy that aren't truthy truth or falsyValues like things like a number right like a number of zero equates to false so that might not be in your in your cards. One thing you could always do with this is do that double exclamation point trick which some people hate, but I understand how it works.
In this episode of Syntax, Wes and Scott talk through some TypeScript Fundamentals around type narrowing, type guards, and type predicates.
Show Notes
Shameless Plugs
Tweet us your tasty treats