The problem is that TypeScript doesn't run at runtime, meaning that it doesn't know the value of the array. So in order to make this work, you have to cast it or do a Typeguard. Somebody messaged me and said TypeScript 5.2 fixes that, which is really nice. But I think there's a lot of annoying little things where any dev can look at that code and say, there's no possible situation where I can see that this would be a string. And unfortunately, yeah, that's the case in some use cases.
In this potluck episode of Syntax, Wes and Scott answer your questions about TypeScript just being fancy duct tape, dealing with back pain while coding, rate limits on cloud services, what to use for email provider, is Firebase a legit platform, and more!
Show Notes
××× SIIIIICK ××× PIIIICKS ×××
Shameless Plugs
Tweet us your tasty treats