Skip to content

Instantly share code, notes, and snippets.

View martinobordin's full-sized avatar
🏠
Working from home

Martino Bordin martinobordin

🏠
Working from home
View GitHub Profile
@martinobordin
martinobordin / class_decorator.ts
Created May 8, 2018 15:38 — 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);
}