Home > OS >  How to watch typescript files in the background continuously without blocking the terminal?
How to watch typescript files in the background continuously without blocking the terminal?

Time:12-10

Is there a way to run tsc -w without blocking the terminal? In other words, is there a way to watch typescript files continuously, without blocking the terminal?

CodePudding user response:

Sure. Run it as a background process. For example, if you're using bash:

tsc -w &

If you want to suppress the output:

tsc -w &>/dev/null &

Though this means if there are any errors, you won't see them. You could pipe the output to a file instead of /dev/null so that you could always less or tail the file anytime you needed to check what's up.

  • Related