Open jandreola opened 2 months ago
Yes, tsc-strict
wasn't designed to work with --watch
in mind and it wont work. It basically runs tsc
twice, one time with strict
flag and compares the outputs after tsc
ends, and if you run with --watch
flag the output will never be collected because tsc
will never end
You could potentially create a PR to add this. There is an example of an incremental program watcher inside of the typescript docs, and you'd just filter out errors coming from strict files.
Here's what I rigged up, though it's not directly usable because it uses internal tools, maybe a good starting place. The strictify
command is just generating a tsconfig.strict.json
which is a copy of the base tsconfig.json
but with strict enabled. There's definitely a way to handle that programatically.
Documentation mentions that all
tsc
flags are supported bytsc-strict
. But when I try to runtsc-strict
with--watch
I get the command stuck on⠏ Looking for strict files...
.Running the command in non watch mode works correctly. And the IDE also show errors correctly.
Any ideas if that is some sort of limitation of
tsc-strict
command?I'm using
typescript-strict-plugin@2.4.4
andtypescript@5.4.5