When developing a typescript project I run the compiler in watch mode:
tsc --watch
Yet when an error appears, I find it hard to discern in the output as I have plain formatted text:
Often time I don't even read it, as there are multiple outputs from previous runs.
I currently am trying to ease my pain by grepping for errors in order to mark those line in red:
tsc -w | egrep --color '.*error.*|$'
yet that feels hackish. Is there a more easy way to get errors printed out nicely in typescript?
TypeScript supports multiple compiler options, and one of them is
pretty
:Alas, it defaults to
false
so you have to enable it in your.tsconfig
:Then you get colors and more context information: