Add support for annotating TypeScript classes

Implemented based on feedback from @olov