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

Provide source mapping #168

Closed amilajack closed 7 years ago

amilajack commented 8 years ago

I'm not sure how difficult this would be, but is it possible to add source mapping?

Uncaught (in promise) TypeError: Value of argument "someArgument" violates contract.

Ideally, this would report at least the filename and the line number, if that's possible.

kirillpisarev commented 7 years ago

agree! it`s very difficult to understand what piece of code raises exception... especially for React component props:

ExceptionsManager.js:82 Unhandled JS Exception: Value of argument "props" violates contract.

Expected:
Props

Got:
{
   ... huge list of props
}
phpnode commented 7 years ago

Sorry for the delay in responding to this, this project is now deprecated in favour of flow-runtime which has much better source map support.

amilajack commented 7 years ago

Would you say its ready to be used?

phpnode commented 7 years ago

I think so, it's still young but v1.0.0 is coming soon and the API will stay stable.