The first rule in TypeScript: Any valid JavaScript is valid TypeScript.
No, there is no particular way to write self-completion of anonymous functions in TS at the moment.
But below is some code that can be used in your situation.
Each class in TS is compiled to (named) spontaneous anonymous functions that returns a function.
Example:
Translates to
//js var someClass = (function () { function someClass() { this.someProperty = "this is a property"; } return someClass; })();
Hope this helps.
source share