Refactor project using TypeScript
- Convert JavaScript files to TypeScript
- Update build configuration for TypeScript compilation
- Add necessary TypeScript dependencies and typings
- Adjust code to follow TypeScript best practices
- Ensure all tests pass with the new TypeScript implementation