Comments in other answers complain that the code is not working.
Actually, this works, but not in jsFiddle ...
This is a problem with code generation in jsFiddle (possibly using an older version of TypeScript).
The code above works with TypeScript 2.7.2 (runs on the node).
So this is basically the code in pablorsk's answer (except there is no need to return an instance), I just added full types to please the more stringent TSLint ...
function logClass<T extends { new(...args: any[]): {} }>(): any { type Ctor = new (...args: any[]) => T; return (target: T): Ctor => {
[EDIT] Also added a line that copies static elements, otherwise the decorated class throws an error when calling the static method.
source share