Skip to content

Commit d906e91

Browse files
committed
Code review comments
1 parent b2f49cc commit d906e91

File tree

10 files changed

+100
-100
lines changed

10 files changed

+100
-100
lines changed

src/compiler/commandLineParser.ts

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace ts {
1515
shortName: "h",
1616
type: "boolean",
1717
showInSimplifiedHelpView: true,
18-
category: Diagnostics.CommandLine_Options,
18+
category: Diagnostics.Command_line_Options,
1919
description: Diagnostics.Print_this_message,
2020
},
2121
{
@@ -27,22 +27,22 @@ namespace ts {
2727
name: "all",
2828
type: "boolean",
2929
showInSimplifiedHelpView: true,
30-
category: Diagnostics.CommandLine_Options,
30+
category: Diagnostics.Command_line_Options,
3131
description: Diagnostics.Show_all_compiler_options,
3232
},
3333
{
3434
name: "version",
3535
shortName: "v",
3636
type: "boolean",
3737
showInSimplifiedHelpView: true,
38-
category: Diagnostics.CommandLine_Options,
38+
category: Diagnostics.Command_line_Options,
3939
description: Diagnostics.Print_the_compiler_s_version,
4040
},
4141
{
4242
name: "init",
4343
type: "boolean",
4444
showInSimplifiedHelpView: true,
45-
category: Diagnostics.CommandLine_Options,
45+
category: Diagnostics.Command_line_Options,
4646
description: Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
4747
},
4848
{
@@ -51,23 +51,23 @@ namespace ts {
5151
type: "string",
5252
isFilePath: true,
5353
showInSimplifiedHelpView: true,
54-
category: Diagnostics.CommandLine_Options,
54+
category: Diagnostics.Command_line_Options,
5555
paramType: Diagnostics.FILE_OR_DIRECTORY,
5656
description: Diagnostics.Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json,
5757
},
5858
{
5959
name: "pretty",
6060
type: "boolean",
6161
showInSimplifiedHelpView: true,
62-
category: Diagnostics.CommandLine_Options,
62+
category: Diagnostics.Command_line_Options,
6363
description: Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental
6464
},
6565
{
6666
name: "watch",
6767
shortName: "w",
6868
type: "boolean",
6969
showInSimplifiedHelpView: true,
70-
category: Diagnostics.CommandLine_Options,
70+
category: Diagnostics.Command_line_Options,
7171
description: Diagnostics.Watch_input_files,
7272
},
7373

@@ -230,49 +230,49 @@ namespace ts {
230230
name: "downlevelIteration",
231231
type: "boolean",
232232
category: Diagnostics.Basic_Options,
233-
description: Diagnostics.Use_full_down_level_iteration_for_iterables_and_arrays_for_for_of_spread_and_destructuring_in_ES5_Slash3
233+
description: Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3
234234
},
235235
{
236236
name: "isolatedModules",
237237
type: "boolean",
238238
category: Diagnostics.Basic_Options,
239-
description: Diagnostics.Unconditionally_emit_imports_for_unresolved_files
239+
description: Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule
240240
},
241241

242242
// Strict Type Checks
243243
{
244244
name: "strict",
245245
type: "boolean",
246246
showInSimplifiedHelpView: true,
247-
category: Diagnostics.Strict_Type_Checks,
248-
description: Diagnostics.Enable_all_strict_type_checks
247+
category: Diagnostics.Strict_Type_Checking_Options,
248+
description: Diagnostics.Enable_all_strict_type_checking_options
249249
},
250250
{
251251
name: "noImplicitAny",
252252
type: "boolean",
253253
showInSimplifiedHelpView: true,
254-
category: Diagnostics.Strict_Type_Checks,
254+
category: Diagnostics.Strict_Type_Checking_Options,
255255
description: Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type,
256256
},
257257
{
258258
name: "strictNullChecks",
259259
type: "boolean",
260260
showInSimplifiedHelpView: true,
261-
category: Diagnostics.Strict_Type_Checks,
261+
category: Diagnostics.Strict_Type_Checking_Options,
262262
description: Diagnostics.Enable_strict_null_checks
263263
},
264264
{
265265
name: "noImplicitThis",
266266
type: "boolean",
267267
showInSimplifiedHelpView: true,
268-
category: Diagnostics.Strict_Type_Checks,
268+
category: Diagnostics.Strict_Type_Checking_Options,
269269
description: Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
270270
},
271271
{
272272
name: "alwaysStrict",
273273
type: "boolean",
274274
showInSimplifiedHelpView: true,
275-
category: Diagnostics.Strict_Type_Checks,
275+
category: Diagnostics.Strict_Type_Checking_Options,
276276
description: Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
277277
},
278278

@@ -331,7 +331,7 @@ namespace ts {
331331
type: "object",
332332
isTSConfigOnly: true,
333333
category: Diagnostics.Module_Resolution_Options,
334-
description: Diagnostics.List_of_path_mapping_entries_for_module_names_to_locations_relative_to_the_baseUrl
334+
description: Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl
335335

336336
},
337337
{
@@ -346,7 +346,7 @@ namespace ts {
346346
isFilePath: true
347347
},
348348
category: Diagnostics.Module_Resolution_Options,
349-
description: Diagnostics.List_of_root_folders_whose_combined_content_represent_the_structure_of_the_project_at_runtime
349+
description: Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime
350350
},
351351
{
352352
name: "typeRoots",
@@ -383,27 +383,27 @@ namespace ts {
383383
type: "string",
384384
isFilePath: true,
385385
paramType: Diagnostics.LOCATION,
386-
category: Diagnostics.SourceMap_Options,
386+
category: Diagnostics.Source_Map_Options,
387387
description: Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
388388
},
389389
{
390390
name: "mapRoot",
391391
type: "string",
392392
isFilePath: true,
393393
paramType: Diagnostics.LOCATION,
394-
category: Diagnostics.SourceMap_Options,
394+
category: Diagnostics.Source_Map_Options,
395395
description: Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
396396
},
397397
{
398398
name: "inlineSourceMap",
399399
type: "boolean",
400-
category: Diagnostics.SourceMap_Options,
400+
category: Diagnostics.Source_Map_Options,
401401
description: Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file
402402
},
403403
{
404404
name: "inlineSources",
405405
type: "boolean",
406-
category: Diagnostics.SourceMap_Options,
406+
category: Diagnostics.Source_Map_Options,
407407
description: Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set
408408
},
409409

@@ -438,7 +438,7 @@ namespace ts {
438438
name: "extendedDiagnostics",
439439
type: "boolean",
440440
category: Diagnostics.Advanced_Options,
441-
description: Diagnostics.Show_extended_diagnostic_information
441+
description: Diagnostics.Show_verbose_diagnostic_information
442442
},
443443
{
444444
name: "traceResolution",
@@ -496,7 +496,7 @@ namespace ts {
496496
name: "locale",
497497
type: "string",
498498
category: Diagnostics.Advanced_Options,
499-
description: Diagnostics.The_locale_to_use_to_show_error_messages_e_g_en_us
499+
description: Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us
500500
},
501501
{
502502
name: "newLine",
@@ -512,7 +512,7 @@ namespace ts {
512512
name: "noErrorTruncation",
513513
type: "boolean",
514514
category: Diagnostics.Advanced_Options,
515-
description: Diagnostics.Do_not_truncation_error_messages
515+
description: Diagnostics.Do_not_truncate_error_messages
516516
},
517517
{
518518
name: "noLib",
@@ -524,7 +524,7 @@ namespace ts {
524524
name: "noResolve",
525525
type: "boolean",
526526
category: Diagnostics.Advanced_Options,
527-
description: Diagnostics.Do_not_add_triple_slash_references_or_module_import_targets_to_the_list_of_compiled_files
527+
description: Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files
528528
},
529529
{
530530
name: "stripInternal",
@@ -536,7 +536,7 @@ namespace ts {
536536
name: "disableSizeLimit",
537537
type: "boolean",
538538
category: Diagnostics.Advanced_Options,
539-
description: Diagnostics.Disable_size_limitation_on_JavaScript_project
539+
description: Diagnostics.Disable_size_limitations_on_JavaScript_projects
540540
},
541541
{
542542
name: "noImplicitUseStrict",
@@ -621,7 +621,7 @@ namespace ts {
621621
name: "plugin",
622622
type: "object"
623623
},
624-
description: Diagnostics.List_of_Language_Service_plugins
624+
description: Diagnostics.List_of_language_service_plugins
625625
}
626626
];
627627

@@ -932,7 +932,7 @@ namespace ts {
932932
if (hasProperty(options, name)) {
933933
// tsconfig only options cannot be specified via command line,
934934
// so we can assume that only types that can appear here string | number | boolean
935-
if (optionsNameMap.has(name) && optionsNameMap.get(name).category === Diagnostics.CommandLine_Options) {
935+
if (optionsNameMap.has(name) && optionsNameMap.get(name).category === Diagnostics.Command_line_Options) {
936936
continue;
937937
}
938938
const value = options[name];
@@ -987,7 +987,7 @@ namespace ts {
987987
function writeConfigurations() {
988988
// Filter applicable options to place in the file
989989
const categorizedOptions = reduceLeft(
990-
filter(optionDeclarations, o => o.category !== Diagnostics.CommandLine_Options && o.category !== Diagnostics.Advanced_Options),
990+
filter(optionDeclarations, o => o.category !== Diagnostics.Command_line_Options && o.category !== Diagnostics.Advanced_Options),
991991
(memo, value) => {
992992
if (value.category) {
993993
const name = getLocaleSpecificMessage(value.category);

src/compiler/diagnosticMessages.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3045,7 +3045,7 @@
30453045
"category": "Message",
30463046
"code": 6149
30473047
},
3048-
"Show extended diagnostic information.": {
3048+
"Show verbose diagnostic information.": {
30493049
"category": "Message",
30503050
"code": 6150
30513051
},
@@ -3057,7 +3057,7 @@
30573057
"category": "Message",
30583058
"code": 6152
30593059
},
3060-
"Unconditionally emit imports for unresolved files.": {
3060+
"Transpile each file as a separate module (similar to 'ts.transpileModule').": {
30613061
"category": "Message",
30623062
"code": 6153
30633063
},
@@ -3069,19 +3069,19 @@
30693069
"category": "Message",
30703070
"code": 6155
30713071
},
3072-
"The locale to use to show error messages, e.g. 'en-us'.": {
3072+
"The locale used when displaying messages to the user (e.g. 'en-us')": {
30733073
"category": "Message",
30743074
"code": 6156
30753075
},
3076-
"Do not generate custom helper functions like __extends in compiled output.": {
3076+
"Do not generate custom helper functions like '__extends' in compiled output.": {
30773077
"category": "Message",
30783078
"code": 6157
30793079
},
30803080
"Do not include the default library file (lib.d.ts).": {
30813081
"category": "Message",
30823082
"code": 6158
30833083
},
3084-
"Do not add triple-slash references or module import targets to the list of compiled files.": {
3084+
"Do not add triple-slash references or imported modules to the list of compiled files.": {
30853085
"category": "Message",
30863086
"code": 6159
30873087
},
@@ -3093,7 +3093,7 @@
30933093
"category": "Message",
30943094
"code": 6161
30953095
},
3096-
"Disable size limitation on JavaScript project.": {
3096+
"Disable size limitations on JavaScript projects.": {
30973097
"category": "Message",
30983098
"code": 6162
30993099
},
@@ -3105,19 +3105,19 @@
31053105
"category": "Message",
31063106
"code": 6164
31073107
},
3108-
"Do not truncation error messages.": {
3108+
"Do not truncate error messages.": {
31093109
"category": "Message",
31103110
"code": 6165
31113111
},
31123112
"Output directory for generated declaration files.": {
31133113
"category": "Message",
31143114
"code": 6166
31153115
},
3116-
"List of path mapping entries for module names to locations relative to the 'baseUrl'.": {
3116+
"A series of entries which re-map imports to lookup locations relative to the 'baseUrl'.": {
31173117
"category": "Message",
31183118
"code": 6167
31193119
},
3120-
"List of root folders whose combined content represent the structure of the project at runtime.": {
3120+
"List of root folders whose combined content represents the structure of the project at runtime.": {
31213121
"category": "Message",
31223122
"code": 6168
31233123
},
@@ -3129,23 +3129,23 @@
31293129
"category": "Message",
31303130
"code": 6170
31313131
},
3132-
"CommandLine Options": {
3132+
"Command-line Options": {
31333133
"category": "Message",
31343134
"code": 6171
31353135
},
31363136
"Basic Options": {
31373137
"category": "Message",
31383138
"code": 6172
31393139
},
3140-
"Strict Type Checks": {
3140+
"Strict Type-Checking Options": {
31413141
"category": "Message",
31423142
"code": 6173
31433143
},
31443144
"Module Resolution Options": {
31453145
"category": "Message",
31463146
"code": 6174
31473147
},
3148-
"SourceMap Options": {
3148+
"Source Map Options": {
31493149
"category": "Message",
31503150
"code": 6175
31513151
},
@@ -3161,15 +3161,15 @@
31613161
"category": "Message",
31623162
"code": 6178
31633163
},
3164-
"Use full down-level iteration for iterables and arrays for 'for-of', spread, and destructuring in ES5/3.": {
3164+
"Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'.": {
31653165
"category": "Message",
31663166
"code": 6179
31673167
},
3168-
"Enable all strict type checks.": {
3168+
"Enable all strict type-checking options.": {
31693169
"category": "Message",
31703170
"code": 6180
31713171
},
3172-
"List of Language Service plugins.": {
3172+
"List of language service plugins.": {
31733173
"category": "Message",
31743174
"code": 6181
31753175
},

tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
// "removeComments": true, /* Do not emit comments to output. */
1515
// "noEmit": true, /* Do not emit outputs. */
1616
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
17-
// "downlevelIteration": true, /* Use full down-level iteration for iterables and arrays for 'for-of', spread, and destructuring in ES5/3. */
18-
// "isolatedModules": true, /* Unconditionally emit imports for unresolved files. */
17+
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
18+
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
1919

20-
/* Strict Type Checks */
21-
"strict": true /* Enable all strict type checks. */
20+
/* Strict Type-Checking Options */
21+
"strict": true /* Enable all strict type-checking options. */
2222
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
2323
// "strictNullChecks": true, /* Enable strict null checks. */
2424
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
@@ -33,13 +33,13 @@
3333
/* Module Resolution Options */
3434
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
3535
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
36-
// "paths": {}, /* List of path mapping entries for module names to locations relative to the 'baseUrl'. */
37-
// "rootDirs": [], /* List of root folders whose combined content represent the structure of the project at runtime. */
36+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
37+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
3838
// "typeRoots": [], /* List of folders to include type definitions from. */
3939
// "types": [], /* Type declaration files to be included in compilation. */
4040
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
4141

42-
/* SourceMap Options */
42+
/* Source Map Options */
4343
// "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
4444
// "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
4545
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */

0 commit comments

Comments
 (0)