title: convert namespace to module based typescript code
body: <p>c# programmer here.
  I started work on a medium sized ts code base. Modelled off an existing c# codebase. I started out doing</p>
  
  <pre><code>namespace Foo
  {
      export function x;
      export const y;
      export class C1{}
  }
  </code></pre>
  
  <p>for things that map to static classes and functions in c# and and 'real' classes</p>
  
  <p>Foo being in one file called Foo.js. To call things I just said <code>Foo.x()</code> in a different file.</p>
  
  <p>All fine, but more reading leads me to 'dont use namespaces'. So time for a refactor</p>
  
  <p>I just want to make sure that I am doing the correct conversion. So now I do</p>
  
  <pre><code>export class Foo
  {
      public x(){};
      public static readonly  y;
      public class C1{}
  }
  </code></pre>
  
  <p>That replacement for const seems a mouthful. And when I call things I have to go</p>
  
  <pre><code>import {Foo} from "./Foo";
  Foo.x();
  </code></pre>
  
  <p>So is this correct? Optimal?</p>
  
  <p>Note - I want to keep the calling code doing <code>Foo.x(); var c = Bar.wibble;</code> etc. Ie really separate out the namespace of different functional parts</p>