Run compiler in watch mode: tsc -w. Change some files, causing multiple compilations.
Expected behavior:
As a developer, I expect the output of tsc -w to be relevant and concise to the current runtime. It should show me the information only of the current run, stating that either the compilation was a success or fail with an error message.
Actual behavior:
The output of previous compilations is kept.
Benefit:
During development, seeing old output is redundant, noisy, and it also takes away if there are errors in the output as I am not alarmed to them right away. They could simply have been errors from the last run.
I have to manually enter new lines or check the timestamps. I have to parse the output what error messages relate to which run. I am discovering myself hitting enter multiple times to create distinguishable marks so that I better see the output of the next run. Sometimes I just cancel watch mode and run tsc multiple times manually while debugging an issue.
Another tool that has a similar feature to what I am proposing is mocha with their min reporter.
Accepting PRs - should be straightforward. Add a cls method to sys; we'll take care of implementing it for tsc.exe
on linux, I m using this for a lone time:
function tscp {
echo -en "\ec\0typescript compiling (source: $1)...\r"
tsc -w -p "$1" | sed 's/^.*File change detected/\x1Bc\0/g'
}
cmd.exe also support "x1Bc" (
How can I disable this?
This is very disruptive for my setup. Please add an option to disable.
@iffy @eile This issue was for clearing the screen during watch mode. If you want an option to disable that feature, you'll better open a new issue as this one has been closed.
(And xkcd prives right once again: https://imgs.xkcd.com/comics/workflow_2x.png ;) )
Most helpful comment
How can I disable this?