title: Correct way to handle undefined declaration files (index.d.ts)
body: <p>I got following error</p>
  
  <pre><code>error TS7016: Could not find a declaration file for module 'react-native-camera'. '/Users/ilja/Documents/Repositories/blok/node_modules/react-native-camera/index.js' implicitly has an 'any' type.
    Try `npm install @types/react-native-camera` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-native-camera';`
  </code></pre>
  
  <p>As a quick fix I created <code>typings/index.d.ts</code> (there is no @types/react-native-camera) file at root of my project and populated it with </p>
  
  <pre><code>declare module 'react-native-camera';
  </code></pre>
  
  <p>then, in my tsconfig file I added it to my type roots like this</p>
  
  <pre><code>"typeRoots": ["node_modules/@types", "./typings"],
  </code></pre>
  
  <p>however I am still getting same error when I build, leading me to think that my implementation is incorrect, what did I miss?</p>
  
  <p>Edit, my full tsconfig looks like this</p>
  
  <pre><code>{
    "compilerOptions": {
      "target": "ES6",
      "module": "commonjs",
      "lib": ["es7"],
      "allowJs": true,
      "checkJs": true,
      "jsx": "react-native",
      "removeComments": true,
      "outDir": "./dist",
      "typeRoots": ["node_modules/@types", "./typings"],
      "experimentalDecorators": true,
      "noFallthroughCasesInSwitch": true,
      "noImplicitReturns": true,
      "noUnusedLocals": true,
      "noUnusedParameters": true,
      "allowSyntheticDefaultImports": true,
      "strict": true
    },
    "exclude": ["./node_modules", "./android", "./ios", "./assets", "./__tests__", "./dist"],
    "include": ["./src"]
  }
  </code></pre>