title: Exclude or Overwrite existing type definition file
body: <p>I'm looking for a way to overwrite an existing library definition file with my own to include some fixes. Here's the directory structure:</p>
  
  <pre><code>node_modules/
    preact/
      dist/
        preact.d.ts &lt;-- this file is wrong, I'd like to use my own
  types/
    preact.d.ts &lt;-- use this file instead
  </code></pre>
  
  <p>Is there anyway to either completely overwrite the one that comes with preact or exclude that file from being picked up? Right now it's showing <code>Duplicate identifier</code>'s all over the place.</p>
  
  <p>If it helps, here's my <code>tsconfig.json</code> file:</p>
  
  <pre><code>{
      "compilerOptions": {
          "target": "es2017",
          "module": "commonjs",
          "sourceMap": false,
          "lib": [
              "dom",
              "es5",
              "es6",
              "es7"
          ],
          "sourceRoot": "src",
          "outDir": "dist",
          "jsx": "react",
          "jsxFactory": "h",
          "noImplicitAny": true,
          "noImplicitThis": true,
          "noImplicitReturns": true,
          "noUnusedLocals": true,
          "noUnusedParameters": true,
          "strictNullChecks": true,
          "allowSyntheticDefaultImports": true,
          "noEmitOnError": true
      },
      "include": [
          "src/**/*",
          "types/**/*"
      ],
      "exclude": [
          "node_modules/preact/dist/preact.d.ts"
      ],
      "baseUrl": ".",
      "paths": {
          "*": [
              "types/*"
          ]
      }
  }
  </code></pre>
  
  <p>Thanks!</p>