title: How to setup 'tsconfig.json' to build files in 'project/src' and write output to 'project/lib'?
body: <p>I tried using the following in my tsconfig.json file:</p>
  
  <pre><code>...
  
  "declaration": true,
  "rootDir": "./src/",
  "outDir": "./lib/",
  
  ...
  </code></pre>
  
  <p>The first time I execute <code>tsc</code> it seems to work fine; but the second time I execute <code>tsc</code> I get an error where <code>tsc</code> complains that it cannot write output because it would overwrite an input file.</p>
  
  <p>It seems that <code>tsc</code> is trying to include the TypeScript declaration files that are written out to my 'lib' directory.</p>