Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* new: Issue #31 - Missing Typescript Definition #34

Merged
merged 1 commit into from
Sep 22, 2016

Conversation

nCore
Copy link
Contributor

@nCore nCore commented Aug 27, 2016

Added Typescript Definition.

@AriaMinaei
Copy link
Owner

AriaMinaei commented Aug 30, 2016

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.

@nCore
Copy link
Contributor Author

nCore commented Sep 7, 2016

That's the question for @radarsu ;)

@radarsu
Copy link

radarsu commented Sep 8, 2016

The definition is great! Thanks!

@AriaMinaei AriaMinaei merged commit e62e373 into AriaMinaei:master Sep 22, 2016
@AriaMinaei
Copy link
Owner

Merged and published. Thanks for the good work :)

@testerez
Copy link
Contributor

@nCore @radarsu: How are we supposed to use the definition in a typescript project?
(I'm using typescript@2)

@radarsu
Copy link

radarsu commented Sep 28, 2016

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.

@testerez
Copy link
Contributor

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 #36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants