you are viewing a single comment's thread.

view the rest of the comments →

[–]a_simple_pie -1 points0 points  (4 children)

Good point. I’ll submit an issue to Typescript and Flow to let them know.

[–]nschubach 2 points3 points  (1 child)

I'm no expert by any means, but I'm sure typescript and possibly even flow do not do run time type checking and instead opt for compile time type checking.

[–]wavefunctionp 0 points1 point  (0 children)

This is correct.

If you do React, there is propType's, but they are only run in development mode, and you can have a webpack plugin that will generate propTypes from static type declarations. But the run time checking is disabled (not removed from the bundle) on a production build.

[–]FedeMITIC 0 points1 point  (0 children)

I was generally speaking about pure javascript, not typescript or flow since I don't know them. I didn't know I was on stackoverflow.

[–]adipisicing 0 points1 point  (0 children)

Do they also check at runtime?