2 ms·
That just means the type annotations are incorrect, and how would runtime type checking solve that?
by baddox 8y ago
That just means the type annotations are incorrect, and how would runtime type checking solve that?
- int_19h 8y agoIt wouldn't solve that, but it would prevent the code from running with data that is incorrect according to type annotations. Think of it as a runtime assert that is automatically generated from the compile-time type annotation. (Unfortunately, the JS runtime object model does not allow for such runtime type checks to be performed with reasonable performance.)