Migrating BTD To TypeScript, and possibly Antd Mobile

BTD has quite a few bugs that was due to type mismatch. After a while I decided to migrate the application from ES6 to TypeScript. I believe it will provide me with some benefits in refactoring, type checking, type safety, and possibly making the code more well organized by having to define types more clearly.

After spending a few hours copying the code over, rename all the files from .js to .tsx and modifying the files to run in TypeScripts, I managed to make it compile and run. Though I had to disable TSLint completely as it throws lots and lots of errors.

To finish this migration, I will just work on it bit by bit until it becomes stable again.

I’m also considering switching the UI framework from Antd to Andtd mobile as it supports building using react-native, which might make it possible to build an Android version of the app together with the web version for desktop.

Leave a Reply

Your email address will not be published. Required fields are marked *