mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Call process.stdout._handle.setBlocking(true) (#22389)
* Call process.stdout._handle.setBlocking(true) This prevents output from being truncated when the compiler can output errors to stdout faster than it can receive them. This may slow down performance for compilations for many errors, but those were already quite slow. * Disable tslint no-unnnecessary-type-assertion-2 It is wrong. It *is* necessary.
This commit is contained in:
@@ -399,4 +399,8 @@ if (ts.Debug.isDebugging) {
|
||||
if (ts.sys.tryEnableSourceMapsForHost && /^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV"))) {
|
||||
ts.sys.tryEnableSourceMapsForHost();
|
||||
}
|
||||
declare var process: any;
|
||||
if (process && process.stdout && process.stdout._handle && process.stdout._handle.setBlocking) {
|
||||
process.stdout._handle.setBlocking(true);
|
||||
}
|
||||
ts.executeCommandLine(ts.sys.args);
|
||||
|
||||
@@ -991,6 +991,7 @@ namespace ts.server {
|
||||
ioSession.logError(err, "unknown");
|
||||
});
|
||||
// See https://github.com/Microsoft/TypeScript/issues/11348
|
||||
// tslint:disable-next-line no-unnecessary-type-assertion-2
|
||||
(process as any).noAsar = true;
|
||||
// Start listening
|
||||
ioSession.listen();
|
||||
|
||||
Reference in New Issue
Block a user