refactor(js): switched to using TypeScript