codemix / babel-plugin-typecheck

Static and runtime type checking for JavaScript in the form of a Babel plugin.
MIT License
886 stars 44 forks source link

Better Errors #6

Closed nmn closed 9 years ago

nmn commented 9 years ago

It would be really useful if the run-time checks can throw more meaningful errors. As a simple improvement, it might be a good step to say what the contract was in the error message rather than say that the type does not match the contract.

phpnode commented 9 years ago

@nmn error messages should now be much better, e.g. Value of argument 'fn' violates contract, expected function or RegExp got number

nmn commented 9 years ago

Awesome