title: In Typescript how to Ignore NPM package's built-in declaration file?
body: <p>I'm using NPM package <code>react-hyperscript-helpers</code>. When I import it it'll read <code>index.js</code> and take the types from <code>index.d.ts</code>. These types however seem to be outdated since I get a lot of errors like this:</p>
  
  <p><code>node_modules/react-hyperscript-helpers/lib/index.d.ts(546,53): error TS2314: Generic type 'HTMLAttributes&lt;T&gt;' requires 1 type argument(s).
  </code></p>
  
  <p>I know how to fix the type errors but I cannot of course edit the file under <code>node_modules</code> because it would get overwritten in the next <code>npm install</code>. </p>
  
  <p><strong>How do I ignore the included <code>.d.ts</code> file and use mine instead?</strong></p>
  
  <p>I tried ignoring all of <code>node_modules</code> in <code>tsconfig.json</code> and setting the <code>typings</code> option but without any success. Here's that file if it's any use:</p>
  
  <pre><code>{
      "compilerOptions": {
          "outDir": "./dist/",
          "sourceMap": true,
          "noImplicitAny": true,
          "module": "commonjs",
          "target": "es5",
          "jsx": "react",
          "typeRoots" : ["./typings"]
      },
      "include": [
            "typescript/**/*"
        ],
        "exclude": [
          "node_modules/**/*",
          "node_modules/react-hyperscript-helpers/lib/*.ts"
        ]
  
  }
  </code></pre>