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 TypeScript typedefs #3

Closed
wants to merge 2 commits into from
Closed

Add TypeScript typedefs #3

wants to merge 2 commits into from

Conversation

ChrisMBarr
Copy link

I've written some TypeScript type definitions for this project, and this PR will include them in the distribution and allow either typings or @types in TypeScript 2.x to automatically pick them up.

More info: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html

@SamVerschueren
Copy link

SamVerschueren commented Dec 15, 2016

Thanks for making the PR @ChrisMBarr !

But unfortunately, you will be better off adding them to DefinitelyTyped which will also allow you to install them with @types.

You may wonder, why? The reason is that this puts a burden to the maintainer of the project, even if he doesn't care about TypeScript. If an API changes, the typedefs will change. Sindre doesn't use TypeScript himself, thus he doesn't want to maintain it (for now). Also, if we start with accepting TypeScript type defs, people will also start adding Flow defs and maybe tomorrow something else.

Personally, I do use TypeScript and even in my own projects I submit PRs to DefinitelyTyped. The reason is that I don't want to bloat my modules with these typedefs because maybe tomorrow I'm using Babel + Flow and this way the commnity could still benefit from the type definitions without me having to maintain it.

I asked Sindre to answer this in his AMA so people don't have to take me on my word when I tell them that he will not merge this.

@ChrisMBarr
Copy link
Author

hmm, ok makes sense. Thanks for the explanation! I'll submit to DefinitelyTyped.

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

2 participants