Supinic / supibot

Multiplatform, utility & novelty chat bot.
GNU Affero General Public License v3.0
130 stars 42 forks source link

Initial Typescript support (!!!) #95

Closed boring-nick closed 2 weeks ago

boring-nick commented 1 month ago

It's finally time image

This PR adds a build step calling tsc and updates the tsconfig to work properly. So far only a few isolated definition files have been changed to .ts (or .mts to be specific), as most other things refer to global variables such as sb, which don't have proper type definitions yet. However, the infrastructure is now there, and it is possible to gradually start moving things over to Typescript on a per-file basis.

I cannot test this fully as I am unable to properly set up Twitch auth, but the setup script and basic startup work, including things like JSON imports.

Originally the compile times were slightly long at about ~6s, but with the composite (and implied incremental) options in tsconfig rebuilds are now down to ~2s.