title: Best practice for exporting types from declaration file to external project
body: <p>I have a working solution to - export types defined from declaration file, that can be used within my project and to be exported out to external projects.</p>
  <p>The only way I could make this work was using a namespace to wrap the type.</p>
  <h2>github - Project X</h2>
  <p><strong>@types/index.d.ts</strong></p>
  <pre class="lang-js prettyprint-override"><code>declare namespace projectGlobal {
    interface Person = {
      name: string;
      age: number;
    }
  }
  // other localised types here, cannot be exported...
  interface Local {
    func: () =&gt; string
  }
  </code></pre>
  <p><strong>src/index.ts</strong></p>
  <pre class="lang-js prettyprint-override"><code>export type Person = ProjectGlobal.Person; // can only export if referenced via namespace.
  // export type Local = Local; // This fails to export
  
  const person1: Person = {
    name: 'john',
    age: 45
  }
  </code></pre>
  <h2>github Project Y</h2>
  <pre class="lang-js prettyprint-override"><code>import {Person} from 'projectx';
  
  const person1: Person = {
    name: 'john',
    age: 45
  }
  
  </code></pre>
  <p>While I'm happy to settle for this as a solution I want to know if this is the right way to do this or if there is a best practice for this.</p>