Add TypeScript and ESM support. (#163)