8000 Just name the option 'pretty' for now. · jango2015/TypeScript@654cbd9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 654cbd9

Browse files
Just name the option 'pretty' for now.
1 parent 4219c5f commit 654cbd9

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

src/compiler/commandLineParser.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,6 @@ namespace ts {
2121
name: "diagnostics",
2222
type: "boolean",
2323
},
24-
{
25-
name: "diagnosticStyle",
26-
paramType: Diagnostics.KIND,
27-
description: Diagnostics.Specify_diagnostic_printing_style_Colon_simple_default_or_pretty,
28-
type: {
29-
"simple": DiagnosticStyle.Simple,
30-
"pretty": DiagnosticStyle.Pretty,
31-
},
32-
error: Diagnostics.Argument_for_diagnosticStyle_must_be_simple_or_pretty,
33-
experimental: true,
34-
},
3524
{
3625
name: "emitBOM",
3726
type: "boolean"
@@ -162,6 +151,12 @@ namespace ts {
162151
type: "boolean",
163152
description: Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
164153
},
154+
{
155+
name: "pretty",
156+
paramType: Diagnostics.KIND,
157+
description: Diagnostics.Stylize_errors_and_messages_using_colors_if_available_experimental,
158+
type: "boolean"
159+
},
165160
{
166161
name: "project",
167162
shortName: "p",

src/compiler/diagnosticMessages.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2286,14 +2286,10 @@
22862286
"category": "Message",
22872287
"code": 6072
22882288
},
2289-
"Specify diagnostic printing style: 'simple' (default) or 'pretty'.": {
2289+
"Stylize errors and messages using colors if available. (experimental)": {
22902290
"category": "Message",
22912291
"code": 6073
22922292
},
2293-
"Argument for '--diagnosticStyle' must be 'simple' or 'pretty'.": {
2294-
"category": "Error",
2295-
"code": 6074
2296-
},
22972293

22982294
"Specify JSX code generation: 'preserve' or 'react'": {
22992295
"category": "Message",

src/compiler/tsc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ namespace ts {
374374
compilerHost.fileExists = cachedFileExists;
375375
}
376376

377-
if (compilerOptions.diagnosticStyle === DiagnosticStyle.Pretty) {
377+
if (compilerOptions.pretty) {
378378
reportDiagnostic = reportDiagnosticWithColorAndContext;
379379
}
380380

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2053,7 +2053,6 @@ namespace ts {
20532053
charset?: string;
20542054
declaration?: boolean;
20552055
diagnostics?: boolean;
2056-
/* @internal */diagnosticStyle?: DiagnosticStyle;
20572056
emitBOM?: boolean;
20582057
help?: boolean;
20592058
init?: boolean;
@@ -2076,6 +2075,7 @@ namespace ts {
20762075
outFile?: string;
20772076
outDir?: string;
20782077
preserveConstEnums?: boolean;
2078+
/* @internal */ pretty?: DiagnosticStyle;
20792079
project?: string;
20802080
removeComments?: boolean;
20812081
rootDir?: string;

0 commit comments

Comments
 (0)
0