title: Is extending a typescript namespace not allowed if defined with `export as namespace`?
body: <p>Working on a project that requires me to declare a new module of an existing Javascript library, however in creating the typings I noticed that when attempting to extend the namespace as it dictates in the <a href="https://www.typescriptlang.org/docs/handbook/declaration-merging.html#merging-namespaces" rel="nofollow noreferrer">typescript documentation</a>, it completely overrides the pre-defined namespace.  </p>
  
  <p>I'm not sure if this is an illegal operation in typescript or an issue with how VSCode interprets the typings.  </p>
  
  <p>Example:  </p>
  
  <pre><code>// file: existing.d.ts
  export as namespace A;
  export class Foo {}
  
  // file: extensions.d.ts
  namespace A {
      export class Bar {}
  }
  
  // resulting intellisense output
  A.Foo // doesn't exist
  A.Bar // exists
  </code></pre>
  
  <p>However if the original declaration of the namespace is changed to be in the format of <code>namespace A {}</code> it then works as expected.</p>
  
  <p>Example:  </p>
  
  <pre><code>// file: existing.d.ts
  namespace A {
      export class Foo {}
  }
  
  // file: extensions.d.ts
  namespace A {
      export class Bar {}
  }
  
  // resulting intellisense output
  A.Foo // exists
  A.Bar // exists
  </code></pre>
  
  <p>I guess the main question is if this is even legal in Typescript, or if this is an issue with VSCode.</p>