Migrate the project to TypeScript. This will allow generating type definitions files instead of writing them by hand.