TypeScript via tsc command: Output to single file without concatenation

Unfortunately it's impossible to compile multiple *.ts files into one *.js without concatenation. Because it's impossible on API level of typescript compile options.

See --out option:

DEPRECATED. Use --outFile instead.

Documentation of --outFile option:

Concatenate and emit output to single file. The order of concatenation is determined by the list of files passed to the compiler on the command line along with triple-slash references and imports. See output file order documentation for more details.

All typescript compiler options


It does one or the other. If there's no .js extension on that file name it should assume a directory.

tsc -out output.js filea.ts fileb.ts... <- output to single file output.js

tsc -out output filea.ts fileb.ts... <- output individual files to dir output

tsc -out output/output.js filea.ts fileb.ts... <- output to single file in another directory