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 typescript definitions #3

Merged
merged 1 commit into from May 10, 2019
Merged

Add typescript definitions #3

merged 1 commit into from May 10, 2019

Conversation

HoldYourWaffle
Copy link
Contributor

I added type definitions so people can use this module in TypeScript without any hassle.
I could submit them to DefinitelyTyped but there are some disadvantages, including (but not limited to):

  • It being giant mono-repo
  • Definition admission & maintenance is really slow
  • Definitions can easily get out of sync*
  • Requires another package install (which is completely unnecessary and inconvenient)

I hope you're willing to add these definitions, it'd make my life a lot easier 馃槃

  • If you're concerned about maintenance I'll gladly maintain these definitions for you. Just mention me whenever you make a relevant change 馃槈

@nikitaeverywhere nikitaeverywhere merged commit 15b5c47 into nikitaeverywhere:master May 10, 2019
@nikitaeverywhere
Copy link
Owner

nikitaeverywhere commented May 10, 2019

@HoldYourWaffle, one question I have though is

Does it matter in which directory to put index.d.ts? I see usually people put it just near the source file, in the same directory. You've decided to put it under types.

@HoldYourWaffle
Copy link
Contributor Author

Not really, as long as the path in package.json is correct.
I also added a test for the definitions which requires some other files (like tsconfig), I figured putting these in a separate directory would cause the least clutter.

@HoldYourWaffle HoldYourWaffle deleted the ts-definitions branch May 10, 2019 16:51
@nikitaeverywhere
Copy link
Owner

Good! Okay, now it's live as v1.0.2. Thank you for your effort in improving the package!

@HoldYourWaffle
Copy link
Contributor Author

No problem, feel free to mention me if the definitions need to be updated :)

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