title: How to type check a single file from command line, using the setting in tsconfig.json?
body: <p>Normally I run <code>tsc -p ./tsconfig.json</code> which type checks all files in the <code>./src</code> folder relative to tsconfig.</p>
  
  <p>But if I run <code>tsc -p ./tsconfig.json src/specific-file.ts</code>, it complains</p>
  
  <blockquote>
    <p>error TS5042: Option 'project' cannot be mixed with source files on a command line.</p>
  </blockquote>
  
  <p>So, if I remove the option and run <code>tsc src/specific-file.ts</code> then it checks the file, but it does not use any settings from tsconfig (because I haven't specified the tsconfig file?).</p>
  
  <p>How can I run <code>tsc</code> on a single file and using the settings in tsconfig that would otherwise be used on the whole project?</p>