Closed nCore closed 8 years ago
Thanks for the good work! Since I don't use TS atm, I can't really test this. But if you think this PR is good enough to merge, I'll do it ;)
So, let me know.
That's the question for @radarsu ;)
The definition is great! Thanks!
Merged and published. Thanks for the good work :)
@nCore @radarsu: How are we supposed to use the definition in a typescript project? (I'm using typescript@2)
After you install pretty-error you have to import it like this:
import PrettyError = require("pretty-error");
If typescript compiler will underline "pretty-error" and say it has no definition (or something alike), then you should add to package.json of pretty-error module:
"typings": "index.d.ts",
After that typescript compiler should be able to find definition. I am using atom editor and typescript 2.1.0 though.
In fact, I'm using ts@2.0.3 (current stable release) and the reference in package.json seams to be required. I just made a PR https://github.com/AriaMinaei/pretty-error/pull/36
Added Typescript Definition.