Skip to content

Console is not cleared in watch mode (also does not show the 0 error count output) #2317

@gitter-me

Description

@gitter-me

Steps to reproduce

I use tsgo --watch --noEmit --skipLibCheck on Win11's Terminal with pwsh 7.5.x
The console is not cleared between watched builds (there is --preserveWatchOutput which defaults to false, in other words the console should be cleared in between)

Sidenote: I also have cases where i press CTRL+S in my IDE (with an error present) in that moment the compiler watcher starts a new compilation, but does not detect the error in the file. If i change the file again, e.g. inserting a new blank line and save, now the error is picked up.

Behavior with typescript@5.9

tsc --watch --noEmit --skipLibCheck

clears the console and shows
[08:31:19] File change detected. Starting incremental compilation...

[08:31:24] Found 0 errors. Watching for file changes.

Behavior with tsgo

tsgo --watch --noEmit --skipLibCheck

the new entries are appended in the console, without clearing (also does not show the 0 errors message)

Found 2 errors in the same file, starting at: src/sample.ts:4

build finished in 0.016s
build starting at 08:37:29 AM
build finished in 0.006s
build starting at 08:37:31 AM
build finished in 0.003s
build starting at 08:37:33 AM
build finished in 0.002s
build starting at 08:37:35 AM
build finished in 0.002s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions