rrdelaney / ReasonablyTyped

:diamond_shape_with_a_dot_inside: Converts Flow and TypeScript definitions to Reason interfaces
https://rrdelaney.github.io/ReasonablyTyped/
MIT License
518 stars 24 forks source link

Better error output for parse errors #43

Open rrdelaney opened 7 years ago

rrdelaney commented 7 years ago

Right now the parse errors are really bad:

Error: Parse_error.Error: undefined
    at Object.compile (/usr/local/lib/node_modules/reasonably-typed/lib/index.js:45:11)
    at fs.readFile (/usr/local/lib/node_modules/reasonably-typed/lib/cli.js:86:40)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:503:3)

We should make this better. I'm thinking something like the codeframe errors we do now for Modulegen errors.

kogai commented 6 years ago

I'd like to tackle this, please?

rrdelaney commented 6 years ago

Go for it 😁 feel free to PM me on discord if you need any help!