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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for typings #6

Closed
wants to merge 2 commits into from
Closed

add support for typings #6

wants to merge 2 commits into from

Conversation

evanshortiss
Copy link

@evanshortiss evanshortiss commented Dec 21, 2016

Thanks for this module! I'm using it in a project right now that uses TypeScript and found that it has no type information so I generated some simple definitions.

Typically there are two ways to add types to a project:

  1. Create a pkg-name.d.ts and referencing it in package.json (like this PR)
  2. Adding an entry to github.com/DefinitelyTyped/DefinitelyTyped

Option 1 is somewhat nicer since you just npm install <pkg-name> and start coding. With option 2 you need to also do npm install @types/<pkg-name>.

Let me know if you'd like to merge this. If not I can add to DefinitelyTyped 馃憤

@floatdrop
Copy link
Contributor

@evanshortiss thanks for contribution, but I would like keep these modules as small as possible.

With option 2 you need to also do npm install @types/<pkg-name>.

flow-typed provides nice cli to install all definitions for npm modules. Perhaps tsd can help with this task.

@sindresorhus
Copy link
Owner

@evanshortiss I think submitting to DefinitelyTyped would be better. See sindresorhus/semver-diff#3 (comment) for reasoning. I haven't had the time to answer sindresorhus/ama#439 yet.

@evanshortiss
Copy link
Author

@sindresorhus that's cool - I can definitely see this side of the coin for maintainers. Thanks for the response 馃憤

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

3 participants