Now that there is a manually written index.js as the entrypoint, we're duplicating a lot of work between index.js and index.d.ts that is error prone. Write an index.ts that replaces both in the repo, and a build process that produces both of the original files for NPM packaging.