title: How to overwrite incorrect TypeScript type definition installed via @types/package
body: <p>Say that I want to use <code>dotenv</code> module in my TypeScript project and install its .d.ts using <code>npm install @types/dotenv --save</code>. Then I realize that the types are not correct. For example, the <code>config()</code> function doesn't return boolean but a richer object.</p>
  
  <p>How do I deal with this situation? Should I just copy the downloaded type definition to another file, update it manually and uninstall @types/dotenv? Is there a better way? (I need the fix right away, not after it has been merged by upstream maintainers.)</p>