TS5042
error TS5042: Option ‘project’ cannot be mixed with source files on a command line.
Broken Code ❌
1 |
|
Fixed Code ✔️
If you’re using the -p
/ --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:
1 |
|