mitchwadair / tesjs

Streamline your Twitch EventSub JavaScript integration with TESjs

Home Page:https://www.tesjs.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[RFE] Add TypeScript Support

mitchwadair opened this issue · comments

Is your feature request related to a problem? Please describe.
A lot of people might use TS to develop their applications.

Describe the solution you'd like
TES should support that by providing type definitions for TES functions. This would be provided through DefinitelyTyped. Maintaining these types will probably be a bit of a pain as EventSub is updated, but not a huge deal. Some examples of things that would need to be added:

  • Every subscription type
  • Condition types for subscriptions
  • Payloads
  • Subscriptions
  • etc

Might be able to avoid publishing to DefinitelyTyped by just including a .d.ts file and adding the types key in package.json
See: https://betterstack.dev/blog/publishing-type-definitions-with-npm-package/#heading-including-type-definitions