Trying to find out what does namespace
keyword mean in TypeScript?
Here's some reshuffle they've done recently to use namespace
instead of module
:
https://github.com/Microsoft/TypeScript/commit/224e7630ea17c4547e97f85634f446b877955a67
In the absence of namespace spec, it looks like a rather pointless rename to make the language look C#-like.
Or is there an obscure little difference between the two? The word namespace
sorta implies the shared scope/space between multiple declarations using the same name. Is that a correct intuition?
You can read about it in the
namespace
keyword issue, but the basic idea is to differentiate between internal (namespace
) and external (module
) modules.