3 ms·
They are, but in practice there's little difference in the ends because you're getting the same feedback (did I pass the right type, yes or no). Like calling so
by rglover 3y ago
They are, but in practice there's little difference in the ends because you're getting the same feedback (did I pass the right type, yes or no). Like calling someone on a cell phone vs. a land line.
If the type of data you're passing around is erratic beyond development (where, just like TypeScript, a function-based approach illuminates incorrect data being passed around), you're writing bad code and TypeScript is nothing more than a crutch.
I expect most hardline TypeScript people to disagree, but type errors are the least of my concerns thanks to the above approach. It's not just an opinion; it's based on experience/evidence [1].
[1] https://github.com/cheatcode/joystick https://github.com/cheatcode/joystick