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