Morsecode.js in TypeScript