I tried to compile the following code in TypeScript to JavaScript:
namespace MyNamespace {
class MyClass {
public test() {
return 1;
}
}
}
If I replace the keyword namespace with module, it still generates exactly the same JavaScript code. So what is the difference between a module and namespace and when should I choose one over another?