What is the difference between `declare namespace` and `declare module` : <p>After reading <a href="https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html" rel="noreferrer">this manual</a> and this quote:</p>

<blockquote>
  <p>It’s important to note that in TypeScript 1.5, the nomenclature has
  changed. “Internal modules” are now “namespaces”. “External modules”
  are now simply “modules”</p>
</blockquote>

<p>I was under impression that <code>declare module</code> is no longer used and is replaced by <code>declare namespace</code>, however when exploring <code>node_modules\@types\node\index.d.ts</code> I can see that both <code>declare module</code> and <code>declare namespace</code> is used:</p>

<pre><code>declare namespace NodeJS {
    export var Console: {
        prototype: Console;
        new(stdout: WritableStream, stderr?: WritableStream): Console;
    }
...

declare module "buffer" {
    export var INSPECT_MAX_BYTES: number;
    var BuffType: typeof Buffer;
    var SlowBuffType: typeof SlowBuffer;
    export { BuffType as Buffer, SlowBuffType as SlowBuffer };
}
</code></pre>

<p>Why so? What's the difference?</p>

<p>External modules (ES6 modules) <strong>do not</strong> come into play here as I understand.</p>
