2 ms·
I’m still surprised that for all the “enhancements” it’s had in the last decade or so JavaScript still doesn’t allow basic things like optional type declaration
by stephenr 6y ago
I’m still surprised that for all the “enhancements” it’s had in the last decade or so JavaScript still doesn’t allow basic things like optional type declarations (ie type hints in php).
Want to accept muck? Leave it as is. Want to accept something specific? Specify the class to accept, or even specify the shape if you want to go the duck typing route.