title: Correct way to dynamically load modules with static typing in TypeScript
body: <p>I am using TypeScript and WebPack.</p>
  
  <p>There is one module which I need to be loaded dynamically.
  Current solution is:</p>
  
  <pre><code>declare function require(module: string): any;
  
  const m = require("./something");
  m.f();
  </code></pre>
  
  <p>But this way I loose my static typing compared to:</p>
  
  <pre><code>import {f} from "./something";
  </code></pre>
  
  <p>Is there a way to type dynamically loaded module with my module type ?</p>