--

Thanks for sharing Valerii! I still prefer union types, because I *want* to have to update my code if I change the literal type. I want the visibility into how that change affects my code, plus I still hate having to click into the enum to look up the value every time. Cheers!

--

--

Dr. Derek Austin 🥳
Dr. Derek Austin 🥳

Written by Dr. Derek Austin 🥳

Hi, I'm Doctor Derek! I've been a professional web developer since 2005, and I love writing about programming with JavaScript, TypeScript, React, Next.js & Git.

No responses yet