mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06: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:
parent
a49e83ffa7
commit
a81f264d70
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user