Closed ovvn closed 6 years ago
@josephg, @devongovett any feedback, please?
I see what you're going for here. But we don't usually do this sort of thing in javascript unless the mistake is common, dangerous or both. The reason is that if we did we'd need to add type checks to all the other parameters too, and aint nobody got time for that.
If you want nice error messages on parameter type mismatches, I recommend typescript.
Got an "Uncaught TypeError" when
s1
param wasn't a string (e.g. a boolean value)