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

Add "types" field to package.json #77

Closed
wants to merge 1 commit into from

Conversation

cprecioso
Copy link
Contributor

The types field in package.json allows TypeScript 2 to automatically use the type declaration without needing to install it specifically through the typings tool.

More info: https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/declaration%20files/Publishing.md

@coveralls
Copy link

coveralls commented Oct 12, 2016

Coverage Status

Coverage remained the same at 95.958% when pulling 1efaab8 on cprecioso:patch-1 into eabc218 on blakeembrey:master.

@blakeembrey
Copy link
Member

#75

@cprecioso
Copy link
Contributor Author

I don't understand what the problems you describe in #75 are. I patched the popsicle package.json in my project and TypeScript detected it right away, without any problems.

@blakeembrey
Copy link
Member

blakeembrey commented Oct 12, 2016

@cprecioso You may also be interested in knowing that isn't a new TypeScript feature. It's existed for a couple of years since 1.5 was released. The reason I don't use it here and in other modules is because of dependencies. TypeScript 2.0 improves that situation by using NPM for dependencies (@types), but they don't support the dependencies I use yet because they haven't implemented redirects yet. See microsoft/types-publisher#4.

@blakeembrey
Copy link
Member

blakeembrey commented Oct 12, 2016

I see two imports in the emitted .d.ts files, one for tough-cookie and one for form-data which should be creating type errors in TypeScript because the definitions don't exist natively (currently come from Typings). Did you not run into that somehow?

@cprecioso
Copy link
Contributor Author

I did run into that, but my build system ate those errors it seems. Ok, thanks!

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

Successfully merging this pull request may close these issues.

None yet

3 participants