When `"composite": true` specified in `tsconfig.json`, `extras.diagnostics` becomes an empty array
I don't know if this is an issue.
I can get all the extras.diagnostics after changes composite to false.
In addition, I noticed when work with ts-loader, extras.diagnostics becomes empty too, while using tspc command is OK.
I also find when work with tspc -w, same issue happens.
I have found the reason of this issue:
The patch of watch.ts, function
function emitFilesAndReportErrors<T extends BuilderProgram>(program: Program | T, ...)
When compile with tspc directly, program parameter is Program type, but when compile with tspc -w, program parameter is BuilderProgram type.
I can confirm to fix this issue by patching with tsp.diagnosticMap.set(program.getProgram ? program.getProgram() : program, allDiagnostics), but since I'm not familiar with typescript source codes, I would not give a pull request.