title: How can I export an interface that I have imported?
body: <p>I am creating a library in typescript, which is spread across multiple files. I take all the classes and constants I have defines and import them into one module, which exports them all under one namespace. I have just defines an interface, and I wish to include it in the same namespace/module as all the other parts of my library. But apparently I can't.</p>
  
  <p>Here's a simplified example:</p>
  
  <p>/app.ts is the entry point of the application, all I do in it at the moment is include my library MyLib:  </p>
  
  <pre><code>//app.ts
  import myLib = require("lib/MyLib/MyLib"); // this works fine
  </code></pre>
  
  <p>/lib/MyLib/MyLib.ts is the file in which I import all of the things defined by MyLib, and export them together:</p>
  
  <pre><code>// lib/MyLib/MyLib.ts
  
  import VehiclesImport = require("./transport/vehicles");
  // error under  VehiclesImport.IAutomobile, saying that VehiclesImport has no property IAutomobile
  export var IAutomobile = VehiclesImport.IAutomobile; 
  export var Car = VehiclesImport.Car;
  </code></pre>
  
  <p>In /lib/MyLib/transport/vehicles.ts, I define several classes and interfaces of vehicles, here, I'll just show IAutomobile and Car:</p>
  
  <pre><code>// lib/MyLib/transport/vehicles.ts
  
  export interface IAutomobile {
      weight: number
  }
  
  export class Car implements IAutomobile {
      weight = 3000
  }
  </code></pre>
  
  <p>I have tried creating a class truck in MyLib.ts, which properly implements IAutomobile, and that works fine, without any error messages. The problem only seems to arise when I want to access IAutomobile outside of an 'implements' statement.</p>
  
  <p>I apologize if this seems like a 'code dump', but in my opinion, this is a serious problem that I cannot access my interfaces except in a class declaration. I have searched Google for the past two hours and found nothing on the subject. Thanks for any help you can give me!</p>
  
  <p><strong>Edit</strong>: I understand that typescript interfaces are not part of the compiled javascript code, but that should not stop me from manipulating them within typescript.</p>