This converts the codebase to TypeScript. Compilation and bundling is done with tsdx. This will hopefully ensure our types are more accurate in the future.