error TS5042: Option ‘project’ cannot be mixed with source files on a command line.
Broken Code ❌
Fixed Code ✔️
If you’re using the
--project option, it’s not possible to directly pass a source file as an argument to the TypeScript compiler. If you want to specify the files to be compiled while using the project option from the command line interface (CLI), you need to add the desired files to the
include section of your TypeScript project configuration: