As of recent, I have been chipping away at a TypeScript rewrite of Koa as an exercise for myself. It seems there has been interest for some time within the koa 3.0 roadmap (https://github.com/koajs/koa/issues/1114) for potentially pursuing this. If there is interest, then I'd be happy to work through trying to contribute this back. I am really just tidying things up at this point.
There are some implementation changes I made, which were predominantly to account for introducing typing as well as removal of code for supporting lesser versions of node around the _headers attribute. Also, I ported over the tests from mocha to jest. I tried to stick as close as possible to the original implementation and test suite as possible.
The repository can be found here: https://github.com/kubejm/koa-ts
If there is interest to contribute this, then let me know how you would like me to proceed as this is a rather significant change.
Sorry, I don't see how rewriting with typescript is going to help us maintain koa. I don't think we will rewrite koa in typescript for now.
Most helpful comment
Sorry, I don't see how rewriting with typescript is going to help us maintain koa. I don't think we will rewrite koa in typescript for now.