This commit is contained in:
Daniel Rosenwasser
2018-04-17 17:06:50 -07:00
parent 299002d597
commit 6953fa1732
3 changed files with 2 additions and 18 deletions

View File

@@ -56,14 +56,6 @@ namespace ts {
category: Diagnostics.Command_line_Options,
description: Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental
},
{
name: "diagnosticStyle",
type: createMapFromTemplate({
auto: DiagnosticStyle.Auto,
pretty: DiagnosticStyle.Pretty,
simple: DiagnosticStyle.Simple,
}),
},
{
name: "preserveWatchOutput",
type: "boolean",

View File

@@ -25,10 +25,10 @@ namespace ts {
}
function shouldBePretty(options: CompilerOptions) {
if ((typeof options.pretty === "undefined" && typeof options.diagnosticStyle === "undefined") || options.diagnosticStyle === DiagnosticStyle.Auto) {
if ((typeof options.pretty === "undefined")) {
return !!sys.writeOutputIsTty && sys.writeOutputIsTty();
}
return options.diagnosticStyle === DiagnosticStyle.Pretty || options.pretty;
return options.pretty;
}
function padLeft(s: string, length: number) {

View File

@@ -4194,7 +4194,6 @@ namespace ts {
/* @internal */ preserveWatchOutput?: boolean;
project?: string;
/* @internal */ pretty?: boolean;
/* @internal */ diagnosticStyle?: DiagnosticStyle;
reactNamespace?: string;
jsxFactory?: string;
removeComments?: boolean;
@@ -4292,13 +4291,6 @@ namespace ts {
JSX,
}
/* @internal */
export const enum DiagnosticStyle {
Auto,
Pretty,
Simple,
}
/** Either a parsed command line or a parsed tsconfig.json */
export interface ParsedCommandLine {
options: CompilerOptions;