title: Where should I place custom .d.ts files?
body: <p>I'm trying to provide typings for the package that does not have them:</p>
  
  <pre><code>error TS7016: Could not find a declaration file for module 'inputmask-core'. './node_modules/inputmask-core/lib/index.js' implicitly has an 'any' type.
  Try `npm install @types/inputmask-core` if it exists or add a new declaration (.d.ts) file containing `declare module 'inputmask-core';`
  </code></pre>
  
  <p>I'm using ts-loader in webpack with typescript 2.4.2, and I have the following type roots set up in tsconfig.json:</p>
  
  <pre><code>"typeRoots": [
    "./node_modules/@types",
    "./src/client/types"
  ]
  </code></pre>
  
  <p>I tried to mimic the package structure in <code>node_modules/@types</code>:</p>
  
  <pre><code>src/client/types
  |--inputmask-core
    |--index.d.ts
  </code></pre>
  
  <p>With the following in <code>index.d.ts</code>:</p>
  
  <pre><code>declare class InputMask {}
  export default InputMask;
  </code></pre>
  
  <p>But the error is still there. What am I doing wrong? Where should I place those custom .d.ts files?</p>
  
  <p>And what is the difference between <code>node_modules/@types</code> and any other type root? Why does TypeScript treat them differently?</p>