Add TypeScript support

Implement TypeScript support. Add tests (all are fine).

https://github.com/isagalaev/highlight.js/issues/484