title: TypeScript declare module for class export
body: <p>I'm new to TypeScript and I'm having a problem loading an es6 javascript module.</p>
  
  <p>I have the following javascript file</p>
  
  <pre><code>//TemplateFactory.js
  export class TemplateFactory{
      static getTemplate(module){
  
      }
  }
  </code></pre>
  
  <p>and I created the following d.ts file</p>
  
  <pre><code>//TemplateFactory.d.ts
  declare module "TemplateFactory" {
      export class TemplateFactory {
          static getTemplate(module);
      }
  }
  </code></pre>
  
  <p>However when I import the js module in another ts file I get this error:</p>
  
  <blockquote>
    <p>File ....TemplateFactory .d.ts is not a module</p>
  </blockquote>
  
  <p>What am I doing wrong? 
  I'm using TypeScript 1.8</p>