You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are using createSemanticDiagnosticsBuilderProgram which is meant only to get errors efficiently for changed files. Emit of files is not tracked.. To support emit you need to use createEmitAndSemanticDiagnosticsBuilderProgram
Oh, thanks a lot. I spent a some days on investigation and missed this. createEmitAndSemanticDiagnosticsBuilderProgram really works fine now.
One question I have, how can I detect in a perfect way that was changes and compilation done: it should be a callback for restarting compiled files.
Right now I detect ts.sys.writeFile and in diagnosticReport restart child_process, but it looks not pretty.
Could you suggest a smarter way?
TypeScript Version: 3.7.4
Search Terms:
ts.createWatchProgram is writing to disk too often; ts.createWatchProgram writes even no changes
Code
Expected behavior:
One file changed - one writing on disk
One file re-saved but not changed - no writing on disk
Actual behavior:
One file changed - every file is written on disk
Playground Link:
Related Issues:
#29927
Notes:
Additional question
The text was updated successfully, but these errors were encountered: