Skip to content

Commit 5c5fca6

Browse files
Just make the compiler option internal.
1 parent c3e00a2 commit 5c5fca6

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/compiler/tsc.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ namespace ts {
66
fileWatcher?: FileWatcher;
77
}
88

9-
export interface CompilerOptions {
10-
diagnosticStyle?: DiagnosticStyle;
11-
}
12-
139
let reportDiagnostic = reportDiagnosticSimply;
1410

1511
function reportDiagnostics(diagnostics: Diagnostic[]): void {
@@ -95,7 +91,7 @@ namespace ts {
9591

9692
function reportDiagnosticSimply(diagnostic: Diagnostic): void {
9793
let output = "";
98-
94+
9995
if (diagnostic.file) {
10096
let { line, character } = getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
10197

@@ -111,7 +107,7 @@ namespace ts {
111107
const shouldUseColors = sys.writesToTty && sys.writesToTty();
112108
const redForegroundEscapeSequence = shouldUseColors ? "\u001b[91m" : "";
113109
const gutterStyleSequence = shouldUseColors ? "\u001b[100;30m" : "";
114-
const gutterSeparator = shouldUseColors ? " " : " | "
110+
const gutterSeparator = shouldUseColors ? " " : " | ";
115111
const resetEscapeSequence = shouldUseColors ? "\u001b[0m" : "";
116112

117113
function reportDiagnosticWithColorAndContext(diagnostic: Diagnostic): void {
@@ -147,7 +143,7 @@ namespace ts {
147143
// Output the gutter and the actual contents of the line.
148144
output += gutterStyleSequence + padLeft(i + 1 + "", gutterWidth) + resetEscapeSequence + gutterSeparator;
149145
output += lineContent + sys.newLine;
150-
146+
151147
// Output the gutter and the error span for the line using tildes.
152148
output += gutterStyleSequence + padLeft("", gutterWidth) + resetEscapeSequence + gutterSeparator;
153149
output += redForegroundEscapeSequence;

src/compiler/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,7 @@ namespace ts {
20432043
charset?: string;
20442044
declaration?: boolean;
20452045
diagnostics?: boolean;
2046+
/* @internal */diagnosticStyle?: DiagnosticStyle;
20462047
emitBOM?: boolean;
20472048
help?: boolean;
20482049
init?: boolean;

0 commit comments

Comments
 (0)