I really like C#'s extension method feature. I was trying to experiment it on Typescript with decorators. { originalFunction: ; { originalFunction = descriptor.value; ctr.prototype[propertyKey] = { originalFunction( , ...args); } } } export ( ) function extension ctr: any let Function return ( ) function target, propertyKey: , descriptor: PropertyDescriptor string ( ) function ...args return this I created a decorator factory named . This takes the class that we want to add the method. Essentially what we want is to run this method on any object that is instance of " ". extension ctr Since Typescript doesn't give a build in extension method concept to us, as a work around, we are adding the the function to the prototype of the passed in class. { ( public name: string = 'joe', public lastname: string = 'doe' ){} } { @extension(User) test(user: User){ .log(user.name , ); } @extension(User) gaveMoney(thisArg: User, : number, : User){ .log( ); } } export class User constructor export class Extensions static console 'this works' static amount to console ` gave \$ ` ${thisArg.name} ${to.name} ${amount} user = User(); user2 = User( , ); user.gaveMoney( , user2); user2.gaveMoney( , user); const new const new 'mehmet' '' 10 20 user.test(); As you can see that the methods that we decorated with are added to the prototype of class. extension User If you are getting an error you can do one of the following two things: Property 'gaveMoney' does not exist on type 'User' (user any).gaveMoney( , user2); as 10 or interface User{ test; gaveMoney(n: number, :User) } export // adding the name only will fix the error u // this will give intellisense Problem By mutating the prototype essentially we are polluting the prototype. So this trick will not work on or objects. Let's see the following as an example. We froze the class and its prototype and got an error because our method wasn't able to modify the class. frozen sealed User2 { @extension(User2) test(user: User2){ .log(user.name , ); } } { name = } .freeze(User2); .freeze(User2.prototype); sealedUser = User2(); sealedUser.test(); export class Extensions2 static console 'this works' export class User2 'john' Object Object const new Conclusion Although this trick will work for our stuff, probably it won't work on most third party libraries assuming that they are safeguarded against prototype pollution. The beauty of extension methods is that it should work on classes that we don't have any control over. Let's hope that Typescript team decides to add this awesome feature. ( ) https://github.com/microsoft/TypeScript/issues/9 Demo for this article: https://stackblitz.com/edit/ts-ms-extension-methods-experiment?file=index.ts