Florian Reuschel put together this tutorial for new TypeScript users. He focuses on one of the most underreported topics in the TypeScript tutorial world: the type scope.
The author centers this article around how he approached solving problem when he was writing a library with a bunch of classes distributed over various folders. For the library’s public API, I wanted those classes to be exposed as a single nested object (e.g. the Console class from Output/Console.ts being available as API.Output.Console).
Now classes in TypeScript are a little bit special. What happens if you define a class Foo is that TypeScript not only creates a variable Foo (containing the class object itself) it also declares a type Foo, representing an instance of the Foo class.
Read more, to get the rest of infor from this excellent article![Read More]