One thing that took me some time to figure out is how to create a construct like static classes in TypeScript. I wanted to directly expose some functions without instantiating a class.
Here is how I did it:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MyModule { | |
export function myStaticFunction() { | |
} | |
} |
Itās not completely the same as a static class in C# but it provides a similar experience.