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

Why don't you add TypeScript or Flow type definitions to your modules? #439

Closed
SamVerschueren opened this issue Dec 15, 2016 · 4 comments
Closed

Comments

@SamVerschueren
Copy link

Could you please answer this once and for all so I can link the answer to people who are doing a PR and trying to add it. I know your statement but people want to hear it from you if I answer them "add it to DefinitelyTyped".

@jfmengels
Copy link

Same thing about Flow types :)

@sindresorhus
Copy link
Owner

sindresorhus commented Feb 18, 2017

I use neither TypeScript nor Flow in my small modules as I don't yet see enough value. If I were to accept type definitions, I would have to maintain them. Which I would do badly. I would say bad definitions are worse than none. DefinitelyTyped and flow-typed are good solutions to this problem. Submit the type definitions there instead.

That being said, I do accept type definitions in larger projects when it makes and someone offers to maintain them. For example, we have both TypeScript and Flow type definitions in AVA. Also, a while back, I adopted Flow in the Pageres codebase.

@sindresorhus sindresorhus changed the title Why don't you add TypeScript type definitions to your modules? Why don't you add TypeScript or Flow type definitions to your modules? Feb 20, 2017
@sindresorhus
Copy link
Owner

sindresorhus commented Aug 20, 2018

I initially didn't want TypeScript definitions in my packages as I didn't use TS so I wouldn't be able to maintain the definitions and I felt TS was too immature. These days I'm using TS more and with TS 3, its become a lot more mature, so I have decided to start accepting TypeScript type definitions for my packages.

Please follow this guide when submitting a type definition:
https://github.com/sindresorhus/typescript-definition-style-guide

I am, however, not accepting Flow type definitions. I just don't have the time or interest in maintaining type definitions for something I don't use. Submit it to flow-typed instead.

@zikaari
Copy link

zikaari commented Aug 20, 2018

Glad to have you on board 😌

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

No branches or pull requests

4 participants