Skip to content

Instantly share code, notes, and snippets.

@balrob
balrob / class_decorator.ts
Created March 19, 2019 02:17 — forked from remojansen/class_decorator.ts
TypeScript Decorators Examples
function logClass(target: any) {
// save a reference to the original constructor
var original = target;
// a utility function to generate instances of a class
function construct(constructor, args) {
var c : any = function () {
return constructor.apply(this, args);
}