title: d.ts file export module
body: <p>I begin with Typescript and i try to create a new module but i have some problems.</p>
  
  <p>I want to import a js file into my index.ts, so i know that I have to create a d.ts file in order to create and explain the function for typescript. Into my index.ts i put this :</p>
  
  <pre class="lang-js prettyprint-override"><code>import Toto from "./toto";
  </code></pre>
  
  <p>And this is my d.ts file :</p>
  
  <pre class="lang-js prettyprint-override"><code>declare module 'Toto' {
  
      function myfunction(callback : Function);
  
      export default myfunction;
  
  }
  </code></pre>
  
  <p>But into my d.ts file i have this error :</p>
  
  <blockquote>
    <p>TS1128 : Declaration or Statement expected</p>
  </blockquote>
  
  <p>I don't understand why because my test is very easy.</p>
  
  <p>I use webpack to build the code, this is my webpack.config.js </p>
  
  <pre class="lang-js prettyprint-override"><code>module.exports = {
      entry: "./index.ts",
      output: {
          path: "bundle/",
          filename: "bundle.js"
      },
      resolve: {
          extensions : [".ts", ".tsx", ".js"]
      },
      module: {
          loaders: [
              { test: /\.tsx?$/, loader: "ts-loader" }
          ]
      }
  };
  </code></pre>
  
  <p>And my tsconfig.json </p>
  
  <pre class="lang-js prettyprint-override"><code>{
    "compilerOptions": {
      "target" : "es5"
    }
  }
  </code></pre>
  
  <p>If you have any ideas :)</p>
  
  <p>Regards  </p>