Grokking TypeScript
Vote

0% completed

​

Legacy Namespaces

A named object that groups related functions, classes, and interfaces under one name, created with the namespace keyword, is a TypeScript namespace. Namespaces appeared before ES6 modules were widely adopted, and they were the usual way to prevent naming conflicts in large programs.

TypeScript still supports namespaces, but its documentation recommends modules for new code. You need to know namespaces to read and maintain older projects, and to read some library type declarations. Older code may also declare them with the word module, as in module Old {}

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content