November 2019
Beginner
804 pages
20h 1m
English
Namespaces are another way to isolate elements in your TypeScript applications. Using the namespace keyword, you can define an isolated namespace to avoid name clashes.
In practice, we don't recommend using namespaces, which is why we won't cover them in any more detail here. Modules provide everything you need to properly isolate code. Modules are more interesting since they declare their dependencies, which allows bundlers to remove unused code.
At the end of the day, modules win in terms of isolation, code reuse, and tooling support. This is true for both web and server-side applications. Also, remember that modules are supported natively from ES2015 onward.
Read now
Unlock full access