title: TypeScript: Specify a directory to look for module type definitions
body: <p>Heyho,</p>
  
  <p>I want to use some javascript libraries in my typescript code for which there are no typings in npm. So I wrote the typings myself and put them in a <code>definitions</code> directory in my source tree. However, I could not get typescript to look in that directory for those modules.</p>
  
  <p>My directory structure looks like this:</p>
  
  <pre><code>+-node_modules
  | |
  | +-moduleA
  | |
  | +-moduleB
  |
  +-src
  | |
  | +-definitions
  | | |
  | | +-moduleA.d.ts
  | | |
  | | +-moduleB.d.ts
  | |
  | +-ts
  |   |
  |   + ... all typescript code ...
  |
  +-tsconfig.json
  </code></pre>
  
  <p>I tried including the modules in the <code>definitions</code>-directory using </p>
  
  <ul>
  <li><code>include</code></li>
  <li><code>files</code></li>
  <li><code>typeRoots</code></li>
  <li><code>paths</code></li>
  </ul>
  
  <p>However none of it worked.</p>
  
  <p>Can somebody tell me, how to get typescript to include those typings?</p>
  
  <p>PS: Why is the TypeScript module handling so complicated???</p>