I consider casting without checks a strict no-no in strongly typed languages like TypeScript
That's an excellent point! Thank you very much! How do you usually deal with (unexpectedly) failing type checks in these scenarios? Do you just throw an error?
That's an excellent point! Thank you very much! How do you usually deal with (unexpectedly) failing type checks in these scenarios? Do you just throw an error?
Yep. I error (or skip if optional).