Skip to content

Instantly share code, notes, and snippets.

@KevinWang15
KevinWang15 / class_decorator.ts
Created April 19, 2017 05:08 — 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);
}