From a15c0de29ae52f3e9c432b7a852f305576c86456 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Mon, 2 Nov 2015 14:50:01 -0800 Subject: [PATCH] Updated LKG. --- lib/tsc.js | 14 ++++++-------- lib/tsserver.js | 1 - lib/typescript.d.ts | 1 - lib/typescript.js | 1 - lib/typescriptServices.d.ts | 1 - lib/typescriptServices.js | 1 - 6 files changed, 6 insertions(+), 13 deletions(-) diff --git a/lib/tsc.js b/lib/tsc.js index 289007115fe9d..883bd0673fd96 100644 --- a/lib/tsc.js +++ b/lib/tsc.js @@ -1034,7 +1034,6 @@ var ts; write: function (s) { process.stdout.write(s); }, - writesToTty: function () { return _tty.isatty(1); }, readFile: readFile, writeFile: writeFile, watchFile: function (fileName, callback) { @@ -31234,13 +31233,12 @@ var ts; output += category + " TS" + diagnostic.code + ": " + ts.flattenDiagnosticMessageText(diagnostic.messageText, ts.sys.newLine) + ts.sys.newLine; ts.sys.write(output); } - var shouldUseColors = !!ts.sys.writesToTty && ts.sys.writesToTty(); - var redForegroundEscapeSequence = shouldUseColors ? "\u001b[91m" : ""; - var yellowForegroundEscapeSequence = shouldUseColors ? "\u001b[93m" : ""; - var blueForegroundEscapeSequence = shouldUseColors ? "\u001b[93m" : ""; - var gutterStyleSequence = shouldUseColors ? "\u001b[100;30m" : ""; - var gutterSeparator = shouldUseColors ? " " : " | "; - var resetEscapeSequence = shouldUseColors ? "\u001b[0m" : ""; + var redForegroundEscapeSequence = "\u001b[91m"; + var yellowForegroundEscapeSequence = "\u001b[93m"; + var blueForegroundEscapeSequence = "\u001b[93m"; + var gutterStyleSequence = "\u001b[100;30m"; + var gutterSeparator = " "; + var resetEscapeSequence = "\u001b[0m"; var elipsis = "..."; var categoryFormatMap = (_a = {}, _a[ts.DiagnosticCategory.Warning] = yellowForegroundEscapeSequence, diff --git a/lib/tsserver.js b/lib/tsserver.js index fd6a5e08efae8..d01b82ef39c16 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -1034,7 +1034,6 @@ var ts; write: function (s) { process.stdout.write(s); }, - writesToTty: function () { return _tty.isatty(1); }, readFile: readFile, writeFile: writeFile, watchFile: function (fileName, callback) { diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts index 90462cb778093..b806eff4ea69b 100644 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts @@ -1429,7 +1429,6 @@ declare namespace ts { newLine: string; useCaseSensitiveFileNames: boolean; write(s: string): void; - writesToTty?(): boolean; readFile(path: string, encoding?: string): string; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; watchFile?(path: string, callback: (path: string, removed?: boolean) => void): FileWatcher; diff --git a/lib/typescript.js b/lib/typescript.js index 8825e423868b0..ab9cad9092cea 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -1939,7 +1939,6 @@ var ts; write: function (s) { process.stdout.write(s); }, - writesToTty: function () { return _tty.isatty(1); }, readFile: readFile, writeFile: writeFile, watchFile: function (fileName, callback) { diff --git a/lib/typescriptServices.d.ts b/lib/typescriptServices.d.ts index f1e509f7d8918..26b0bf8083001 100644 --- a/lib/typescriptServices.d.ts +++ b/lib/typescriptServices.d.ts @@ -1429,7 +1429,6 @@ declare namespace ts { newLine: string; useCaseSensitiveFileNames: boolean; write(s: string): void; - writesToTty?(): boolean; readFile(path: string, encoding?: string): string; writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; watchFile?(path: string, callback: (path: string, removed?: boolean) => void): FileWatcher; diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index 8825e423868b0..ab9cad9092cea 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -1939,7 +1939,6 @@ var ts; write: function (s) { process.stdout.write(s); }, - writesToTty: function () { return _tty.isatty(1); }, readFile: readFile, writeFile: writeFile, watchFile: function (fileName, callback) {