Narrowing means checking if something is of a specific type yeah and this type of thing directly comes about when you're getting into types script. Type guarding like or type narrowing and type guarding it's so funny these things blend together in my mind a lot they really come into play when you're trying to narrow down what a specific type actually is exactly. I'm making my hands go wide to narrow you kind of look like the the visual to give folks a visual here he's kind of doing the gesture of like come on come on what's going on here A query selector can't can't guarantee that that value is going to be there because touch script can't guarantees anything.
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