you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 2 years ago (1 child)

The libraries underneath will still allow nonsense at runtime

Only if you use a badly written library. Most libraries have types provided by DefinitelyTyped. Those who don’t are (in my experience) so tiny that you probably aren’t using them; or, if you really wanted, can check yourself.

In the end, if you encounter a bug, it’ still 99% of the time not a library’s fault, even if it’s written in plain JS.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 2 years ago* (last edited 2 years ago)

    Like I said to the other person, those are just types over top of JavaScript that can still fail if/when coercion happens under the hood.

    I don't even know how to search it now, but a specific example came up on here of a time when JavaScript libraries will cause problems, and problems you can't even see very well if you're expecting it to act strictly-typed.

  • source
  • parent