Compile single .ts file to stdout

1.4k Views Asked by At

I am looking to compile a single .ts file to stdout, something like this:

tsc foo.ts > foo.js

is this possible somehow? I want to control where the output goes without using a tsconfig.json file.

1

There are 1 best solutions below

0
On
tsc foo.ts --out /dev/stdout | another-program

It comes from this discussion.