Closed bradtaniguchi closed 4 years ago
@bradtaniguchi FCC approved TS finally?😱
more like approved of doing whatever, and approved of a lot more features, so it's more or less now or never!
more like approved of doing whatever, and approved of a lot more features, so it's more or less now or never!
Haha.... good to know...
Any recommendation for learning materials on studying TS?
@cjcanlas01 the official docs are the best starting point: https://www.typescriptlang.org/docs/home.html
I'm slowly going through the codebase and refactoring it with TS. Most changes are actually related to the code itself. (typos, use of import/export
, adding required type defs)
You can checkout the changes in this branch: https://github.com/bradtaniguchi/discord-bot-test/tree/chore/55/migrate-to-ts
edit Should move the postinstall
script to something recommended here:
https://devcenter.heroku.com/articles/nodejs-support#heroku-specific-build-steps
Is your feature request related to a problem? Please describe. Currently the project is written in JS for lower barrier of entry, however discord.js already provides first party TS support via providing their own types.
Describe the solution you'd like We should migrate to TS which will make it slightly harder to develop, but make it easier to leverage discord features thru the provided types.
Describe alternatives you've considered We don't need TS, but I believe having it will prevent bugs down the line, and increase overall code quality.
Additional context Due to how the code is currently written, we should be able to make minimal changes to the existing code to get everything to work.