3 ms·
the moment they add this to javascript, there will be people out there feeding strings to number-annotated parameters of functions (and so on). and then of cour
by asddubs 4y ago
the moment they add this to javascript, there will be people out there feeding strings to number-annotated parameters of functions (and so on). and then of course no one is going to want to break existing code. that's why doing this in a way that is not enforced is corrosive to having types in the language in the future.
- rektide 4y agoas others have stated, the answer seems to be to opt in: "use typechecks" or only warn. i don't think anyone would consider turning it on by default everywhere. this seems like an extreme non-issue.