typescript 4.6.0-dev.20211126 → 4.6.0-dev.20211203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +184 -107
- package/lib/tsserver.js +267 -185
- package/lib/tsserverlibrary.js +267 -185
- package/lib/typescript.js +267 -185
- package/lib/typescriptServices.js +267 -185
- package/lib/typingsInstaller.js +175 -112
- package/package.json +2 -2
package/lib/tsserver.js
CHANGED
|
@@ -100,7 +100,7 @@ var ts;
|
|
|
100
100
|
// The following is baselined as a literal template type without intervention
|
|
101
101
|
/** The version of the TypeScript compiler release */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
103
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20211203";
|
|
104
104
|
/* @internal */
|
|
105
105
|
var Comparison;
|
|
106
106
|
(function (Comparison) {
|
|
@@ -33608,9 +33608,10 @@ var ts;
|
|
|
33608
33608
|
// - "(x,y)" is a comma expression parsed as a signature with two parameters.
|
|
33609
33609
|
// - "a ? (b): c" will have "(b):" parsed as a signature with a return type annotation.
|
|
33610
33610
|
// - "a ? (b): function() {}" will too, since function() is a valid JSDoc function type.
|
|
33611
|
+
// - "a ? (b): (function() {})" as well, but inside of a parenthesized type.
|
|
33611
33612
|
//
|
|
33612
33613
|
// So we need just a bit of lookahead to ensure that it can only be a signature.
|
|
33613
|
-
var hasJSDocFunctionType = type && ts.isJSDocFunctionType(type);
|
|
33614
|
+
var hasJSDocFunctionType = type && (ts.isJSDocFunctionType(type) || ts.isParenthesizedTypeNode(type) && ts.isJSDocFunctionType(type.type));
|
|
33614
33615
|
if (!allowAmbiguity && token() !== 38 /* EqualsGreaterThanToken */ && (hasJSDocFunctionType || token() !== 18 /* OpenBraceToken */)) {
|
|
33615
33616
|
// Returning undefined here will cause our caller to rewind to where we started from.
|
|
33616
33617
|
return undefined;
|
|
@@ -38009,7 +38010,11 @@ var ts;
|
|
|
38009
38010
|
var ts;
|
|
38010
38011
|
(function (ts) {
|
|
38011
38012
|
/* @internal */
|
|
38012
|
-
ts.compileOnSaveCommandLineOption = {
|
|
38013
|
+
ts.compileOnSaveCommandLineOption = {
|
|
38014
|
+
name: "compileOnSave",
|
|
38015
|
+
type: "boolean",
|
|
38016
|
+
defaultValueDescription: false,
|
|
38017
|
+
};
|
|
38013
38018
|
var jsxOptionMap = new ts.Map(ts.getEntries({
|
|
38014
38019
|
"preserve": 1 /* Preserve */,
|
|
38015
38020
|
"react-native": 3 /* ReactNative */,
|
|
@@ -38123,6 +38128,7 @@ var ts;
|
|
|
38123
38128
|
})),
|
|
38124
38129
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38125
38130
|
description: ts.Diagnostics.Specify_how_the_TypeScript_watch_mode_works,
|
|
38131
|
+
defaultValueDescription: ts.WatchFileKind.UseFsEvents,
|
|
38126
38132
|
},
|
|
38127
38133
|
{
|
|
38128
38134
|
name: "watchDirectory",
|
|
@@ -38134,6 +38140,7 @@ var ts;
|
|
|
38134
38140
|
})),
|
|
38135
38141
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38136
38142
|
description: ts.Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,
|
|
38143
|
+
defaultValueDescription: ts.WatchDirectoryKind.UseFsEvents,
|
|
38137
38144
|
},
|
|
38138
38145
|
{
|
|
38139
38146
|
name: "fallbackPolling",
|
|
@@ -38145,13 +38152,14 @@ var ts;
|
|
|
38145
38152
|
})),
|
|
38146
38153
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38147
38154
|
description: ts.Diagnostics.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,
|
|
38155
|
+
defaultValueDescription: ts.PollingWatchKind.PriorityInterval,
|
|
38148
38156
|
},
|
|
38149
38157
|
{
|
|
38150
38158
|
name: "synchronousWatchDirectory",
|
|
38151
38159
|
type: "boolean",
|
|
38152
38160
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38153
38161
|
description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
|
|
38154
|
-
defaultValueDescription:
|
|
38162
|
+
defaultValueDescription: false,
|
|
38155
38163
|
},
|
|
38156
38164
|
{
|
|
38157
38165
|
name: "excludeDirectories",
|
|
@@ -38187,13 +38195,13 @@ var ts;
|
|
|
38187
38195
|
showInSimplifiedHelpView: true,
|
|
38188
38196
|
category: ts.Diagnostics.Command_line_Options,
|
|
38189
38197
|
description: ts.Diagnostics.Print_this_message,
|
|
38190
|
-
defaultValueDescription:
|
|
38198
|
+
defaultValueDescription: false,
|
|
38191
38199
|
},
|
|
38192
38200
|
{
|
|
38193
38201
|
name: "help",
|
|
38194
38202
|
shortName: "?",
|
|
38195
38203
|
type: "boolean",
|
|
38196
|
-
defaultValueDescription:
|
|
38204
|
+
defaultValueDescription: false,
|
|
38197
38205
|
},
|
|
38198
38206
|
{
|
|
38199
38207
|
name: "watch",
|
|
@@ -38203,7 +38211,7 @@ var ts;
|
|
|
38203
38211
|
isCommandLineOnly: true,
|
|
38204
38212
|
category: ts.Diagnostics.Command_line_Options,
|
|
38205
38213
|
description: ts.Diagnostics.Watch_input_files,
|
|
38206
|
-
defaultValueDescription:
|
|
38214
|
+
defaultValueDescription: false,
|
|
38207
38215
|
},
|
|
38208
38216
|
{
|
|
38209
38217
|
name: "preserveWatchOutput",
|
|
@@ -38211,28 +38219,28 @@ var ts;
|
|
|
38211
38219
|
showInSimplifiedHelpView: false,
|
|
38212
38220
|
category: ts.Diagnostics.Output_Formatting,
|
|
38213
38221
|
description: ts.Diagnostics.Disable_wiping_the_console_in_watch_mode,
|
|
38214
|
-
defaultValueDescription:
|
|
38222
|
+
defaultValueDescription: false,
|
|
38215
38223
|
},
|
|
38216
38224
|
{
|
|
38217
38225
|
name: "listFiles",
|
|
38218
38226
|
type: "boolean",
|
|
38219
38227
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38220
38228
|
description: ts.Diagnostics.Print_all_of_the_files_read_during_the_compilation,
|
|
38221
|
-
defaultValueDescription:
|
|
38229
|
+
defaultValueDescription: false,
|
|
38222
38230
|
},
|
|
38223
38231
|
{
|
|
38224
38232
|
name: "explainFiles",
|
|
38225
38233
|
type: "boolean",
|
|
38226
38234
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38227
38235
|
description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,
|
|
38228
|
-
defaultValueDescription:
|
|
38236
|
+
defaultValueDescription: false,
|
|
38229
38237
|
},
|
|
38230
38238
|
{
|
|
38231
38239
|
name: "listEmittedFiles",
|
|
38232
38240
|
type: "boolean",
|
|
38233
38241
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38234
38242
|
description: ts.Diagnostics.Print_the_names_of_emitted_files_after_a_compilation,
|
|
38235
|
-
defaultValueDescription:
|
|
38243
|
+
defaultValueDescription: false,
|
|
38236
38244
|
},
|
|
38237
38245
|
{
|
|
38238
38246
|
name: "pretty",
|
|
@@ -38240,28 +38248,28 @@ var ts;
|
|
|
38240
38248
|
showInSimplifiedHelpView: true,
|
|
38241
38249
|
category: ts.Diagnostics.Output_Formatting,
|
|
38242
38250
|
description: ts.Diagnostics.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,
|
|
38243
|
-
defaultValueDescription:
|
|
38251
|
+
defaultValueDescription: true,
|
|
38244
38252
|
},
|
|
38245
38253
|
{
|
|
38246
38254
|
name: "traceResolution",
|
|
38247
38255
|
type: "boolean",
|
|
38248
38256
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38249
38257
|
description: ts.Diagnostics.Log_paths_used_during_the_moduleResolution_process,
|
|
38250
|
-
defaultValueDescription:
|
|
38258
|
+
defaultValueDescription: false,
|
|
38251
38259
|
},
|
|
38252
38260
|
{
|
|
38253
38261
|
name: "diagnostics",
|
|
38254
38262
|
type: "boolean",
|
|
38255
38263
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38256
38264
|
description: ts.Diagnostics.Output_compiler_performance_information_after_building,
|
|
38257
|
-
defaultValueDescription:
|
|
38265
|
+
defaultValueDescription: false,
|
|
38258
38266
|
},
|
|
38259
38267
|
{
|
|
38260
38268
|
name: "extendedDiagnostics",
|
|
38261
38269
|
type: "boolean",
|
|
38262
38270
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38263
38271
|
description: ts.Diagnostics.Output_more_detailed_compiler_performance_information_after_building,
|
|
38264
|
-
defaultValueDescription:
|
|
38272
|
+
defaultValueDescription: false,
|
|
38265
38273
|
},
|
|
38266
38274
|
{
|
|
38267
38275
|
name: "generateCpuProfile",
|
|
@@ -38297,7 +38305,7 @@ var ts;
|
|
|
38297
38305
|
affectsEmit: true,
|
|
38298
38306
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38299
38307
|
description: ts.Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,
|
|
38300
|
-
defaultValueDescription:
|
|
38308
|
+
defaultValueDescription: false,
|
|
38301
38309
|
},
|
|
38302
38310
|
{
|
|
38303
38311
|
name: "locale",
|
|
@@ -38333,7 +38341,7 @@ var ts;
|
|
|
38333
38341
|
showInSimplifiedHelpView: true,
|
|
38334
38342
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38335
38343
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
38336
|
-
defaultValueDescription:
|
|
38344
|
+
defaultValueDescription: 0 /* ES3 */,
|
|
38337
38345
|
};
|
|
38338
38346
|
var commandOptionsWithoutBuild = [
|
|
38339
38347
|
// CommandLine only options
|
|
@@ -38343,7 +38351,7 @@ var ts;
|
|
|
38343
38351
|
showInSimplifiedHelpView: true,
|
|
38344
38352
|
category: ts.Diagnostics.Command_line_Options,
|
|
38345
38353
|
description: ts.Diagnostics.Show_all_compiler_options,
|
|
38346
|
-
defaultValueDescription:
|
|
38354
|
+
defaultValueDescription: false,
|
|
38347
38355
|
},
|
|
38348
38356
|
{
|
|
38349
38357
|
name: "version",
|
|
@@ -38352,7 +38360,7 @@ var ts;
|
|
|
38352
38360
|
showInSimplifiedHelpView: true,
|
|
38353
38361
|
category: ts.Diagnostics.Command_line_Options,
|
|
38354
38362
|
description: ts.Diagnostics.Print_the_compiler_s_version,
|
|
38355
|
-
defaultValueDescription:
|
|
38363
|
+
defaultValueDescription: false,
|
|
38356
38364
|
},
|
|
38357
38365
|
{
|
|
38358
38366
|
name: "init",
|
|
@@ -38360,7 +38368,7 @@ var ts;
|
|
|
38360
38368
|
showInSimplifiedHelpView: true,
|
|
38361
38369
|
category: ts.Diagnostics.Command_line_Options,
|
|
38362
38370
|
description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
|
|
38363
|
-
defaultValueDescription:
|
|
38371
|
+
defaultValueDescription: false,
|
|
38364
38372
|
},
|
|
38365
38373
|
{
|
|
38366
38374
|
name: "project",
|
|
@@ -38379,7 +38387,7 @@ var ts;
|
|
|
38379
38387
|
showInSimplifiedHelpView: true,
|
|
38380
38388
|
category: ts.Diagnostics.Command_line_Options,
|
|
38381
38389
|
description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,
|
|
38382
|
-
defaultValueDescription:
|
|
38390
|
+
defaultValueDescription: false,
|
|
38383
38391
|
},
|
|
38384
38392
|
{
|
|
38385
38393
|
name: "showConfig",
|
|
@@ -38388,7 +38396,7 @@ var ts;
|
|
|
38388
38396
|
category: ts.Diagnostics.Command_line_Options,
|
|
38389
38397
|
isCommandLineOnly: true,
|
|
38390
38398
|
description: ts.Diagnostics.Print_the_final_configuration_instead_of_building,
|
|
38391
|
-
defaultValueDescription:
|
|
38399
|
+
defaultValueDescription: false,
|
|
38392
38400
|
},
|
|
38393
38401
|
{
|
|
38394
38402
|
name: "listFilesOnly",
|
|
@@ -38398,7 +38406,7 @@ var ts;
|
|
|
38398
38406
|
affectsEmit: true,
|
|
38399
38407
|
isCommandLineOnly: true,
|
|
38400
38408
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
38401
|
-
defaultValueDescription:
|
|
38409
|
+
defaultValueDescription: false,
|
|
38402
38410
|
},
|
|
38403
38411
|
// Basic
|
|
38404
38412
|
ts.targetOptionDeclaration,
|
|
@@ -38425,13 +38433,15 @@ var ts;
|
|
|
38425
38433
|
showInSimplifiedHelpView: true,
|
|
38426
38434
|
category: ts.Diagnostics.Modules,
|
|
38427
38435
|
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
38436
|
+
defaultValueDescription: undefined,
|
|
38428
38437
|
},
|
|
38429
38438
|
{
|
|
38430
38439
|
name: "lib",
|
|
38431
38440
|
type: "list",
|
|
38432
38441
|
element: {
|
|
38433
38442
|
name: "lib",
|
|
38434
|
-
type: ts.libMap
|
|
38443
|
+
type: ts.libMap,
|
|
38444
|
+
defaultValueDescription: undefined,
|
|
38435
38445
|
},
|
|
38436
38446
|
affectsProgramStructure: true,
|
|
38437
38447
|
showInSimplifiedHelpView: true,
|
|
@@ -38446,7 +38456,7 @@ var ts;
|
|
|
38446
38456
|
showInSimplifiedHelpView: true,
|
|
38447
38457
|
category: ts.Diagnostics.JavaScript_Support,
|
|
38448
38458
|
description: ts.Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
|
|
38449
|
-
defaultValueDescription:
|
|
38459
|
+
defaultValueDescription: false,
|
|
38450
38460
|
},
|
|
38451
38461
|
{
|
|
38452
38462
|
name: "checkJs",
|
|
@@ -38454,7 +38464,7 @@ var ts;
|
|
|
38454
38464
|
showInSimplifiedHelpView: true,
|
|
38455
38465
|
category: ts.Diagnostics.JavaScript_Support,
|
|
38456
38466
|
description: ts.Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
|
|
38457
|
-
defaultValueDescription:
|
|
38467
|
+
defaultValueDescription: false,
|
|
38458
38468
|
},
|
|
38459
38469
|
{
|
|
38460
38470
|
name: "jsx",
|
|
@@ -38466,7 +38476,7 @@ var ts;
|
|
|
38466
38476
|
showInSimplifiedHelpView: true,
|
|
38467
38477
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38468
38478
|
description: ts.Diagnostics.Specify_what_JSX_code_is_generated,
|
|
38469
|
-
defaultValueDescription:
|
|
38479
|
+
defaultValueDescription: undefined,
|
|
38470
38480
|
},
|
|
38471
38481
|
{
|
|
38472
38482
|
name: "declaration",
|
|
@@ -38486,7 +38496,7 @@ var ts;
|
|
|
38486
38496
|
showInSimplifiedHelpView: true,
|
|
38487
38497
|
category: ts.Diagnostics.Emit,
|
|
38488
38498
|
transpileOptionValue: undefined,
|
|
38489
|
-
defaultValueDescription:
|
|
38499
|
+
defaultValueDescription: false,
|
|
38490
38500
|
description: ts.Diagnostics.Create_sourcemaps_for_d_ts_files
|
|
38491
38501
|
},
|
|
38492
38502
|
{
|
|
@@ -38497,7 +38507,7 @@ var ts;
|
|
|
38497
38507
|
category: ts.Diagnostics.Emit,
|
|
38498
38508
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
38499
38509
|
transpileOptionValue: undefined,
|
|
38500
|
-
defaultValueDescription:
|
|
38510
|
+
defaultValueDescription: false,
|
|
38501
38511
|
},
|
|
38502
38512
|
{
|
|
38503
38513
|
name: "sourceMap",
|
|
@@ -38505,7 +38515,7 @@ var ts;
|
|
|
38505
38515
|
affectsEmit: true,
|
|
38506
38516
|
showInSimplifiedHelpView: true,
|
|
38507
38517
|
category: ts.Diagnostics.Emit,
|
|
38508
|
-
defaultValueDescription:
|
|
38518
|
+
defaultValueDescription: false,
|
|
38509
38519
|
description: ts.Diagnostics.Create_source_map_files_for_emitted_JavaScript_files,
|
|
38510
38520
|
},
|
|
38511
38521
|
{
|
|
@@ -38546,7 +38556,7 @@ var ts;
|
|
|
38546
38556
|
isTSConfigOnly: true,
|
|
38547
38557
|
category: ts.Diagnostics.Projects,
|
|
38548
38558
|
transpileOptionValue: undefined,
|
|
38549
|
-
defaultValueDescription:
|
|
38559
|
+
defaultValueDescription: false,
|
|
38550
38560
|
description: ts.Diagnostics.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references,
|
|
38551
38561
|
},
|
|
38552
38562
|
{
|
|
@@ -38566,7 +38576,7 @@ var ts;
|
|
|
38566
38576
|
affectsEmit: true,
|
|
38567
38577
|
showInSimplifiedHelpView: true,
|
|
38568
38578
|
category: ts.Diagnostics.Emit,
|
|
38569
|
-
defaultValueDescription:
|
|
38579
|
+
defaultValueDescription: false,
|
|
38570
38580
|
description: ts.Diagnostics.Disable_emitting_comments,
|
|
38571
38581
|
},
|
|
38572
38582
|
{
|
|
@@ -38576,7 +38586,7 @@ var ts;
|
|
|
38576
38586
|
category: ts.Diagnostics.Emit,
|
|
38577
38587
|
description: ts.Diagnostics.Disable_emitting_files_from_a_compilation,
|
|
38578
38588
|
transpileOptionValue: undefined,
|
|
38579
|
-
defaultValueDescription:
|
|
38589
|
+
defaultValueDescription: false,
|
|
38580
38590
|
},
|
|
38581
38591
|
{
|
|
38582
38592
|
name: "importHelpers",
|
|
@@ -38584,7 +38594,7 @@ var ts;
|
|
|
38584
38594
|
affectsEmit: true,
|
|
38585
38595
|
category: ts.Diagnostics.Emit,
|
|
38586
38596
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
38587
|
-
defaultValueDescription:
|
|
38597
|
+
defaultValueDescription: false,
|
|
38588
38598
|
},
|
|
38589
38599
|
{
|
|
38590
38600
|
name: "importsNotUsedAsValues",
|
|
@@ -38596,7 +38606,8 @@ var ts;
|
|
|
38596
38606
|
affectsEmit: true,
|
|
38597
38607
|
affectsSemanticDiagnostics: true,
|
|
38598
38608
|
category: ts.Diagnostics.Emit,
|
|
38599
|
-
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types
|
|
38609
|
+
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
38610
|
+
defaultValueDescription: 0 /* Remove */,
|
|
38600
38611
|
},
|
|
38601
38612
|
{
|
|
38602
38613
|
name: "downlevelIteration",
|
|
@@ -38604,7 +38615,7 @@ var ts;
|
|
|
38604
38615
|
affectsEmit: true,
|
|
38605
38616
|
category: ts.Diagnostics.Emit,
|
|
38606
38617
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
38607
|
-
defaultValueDescription:
|
|
38618
|
+
defaultValueDescription: false,
|
|
38608
38619
|
},
|
|
38609
38620
|
{
|
|
38610
38621
|
name: "isolatedModules",
|
|
@@ -38612,7 +38623,7 @@ var ts;
|
|
|
38612
38623
|
category: ts.Diagnostics.Interop_Constraints,
|
|
38613
38624
|
description: ts.Diagnostics.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,
|
|
38614
38625
|
transpileOptionValue: true,
|
|
38615
|
-
defaultValueDescription:
|
|
38626
|
+
defaultValueDescription: false,
|
|
38616
38627
|
},
|
|
38617
38628
|
// Strict Type Checks
|
|
38618
38629
|
{
|
|
@@ -38623,7 +38634,7 @@ var ts;
|
|
|
38623
38634
|
showInSimplifiedHelpView: true,
|
|
38624
38635
|
category: ts.Diagnostics.Type_Checking,
|
|
38625
38636
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
38626
|
-
defaultValueDescription:
|
|
38637
|
+
defaultValueDescription: false,
|
|
38627
38638
|
},
|
|
38628
38639
|
{
|
|
38629
38640
|
name: "noImplicitAny",
|
|
@@ -38684,7 +38695,7 @@ var ts;
|
|
|
38684
38695
|
strictFlag: true,
|
|
38685
38696
|
category: ts.Diagnostics.Type_Checking,
|
|
38686
38697
|
description: ts.Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
|
|
38687
|
-
defaultValueDescription:
|
|
38698
|
+
defaultValueDescription: false,
|
|
38688
38699
|
},
|
|
38689
38700
|
{
|
|
38690
38701
|
name: "alwaysStrict",
|
|
@@ -38702,7 +38713,7 @@ var ts;
|
|
|
38702
38713
|
affectsSemanticDiagnostics: true,
|
|
38703
38714
|
category: ts.Diagnostics.Type_Checking,
|
|
38704
38715
|
description: ts.Diagnostics.Enable_error_reporting_when_a_local_variables_aren_t_read,
|
|
38705
|
-
defaultValueDescription:
|
|
38716
|
+
defaultValueDescription: false,
|
|
38706
38717
|
},
|
|
38707
38718
|
{
|
|
38708
38719
|
name: "noUnusedParameters",
|
|
@@ -38710,7 +38721,7 @@ var ts;
|
|
|
38710
38721
|
affectsSemanticDiagnostics: true,
|
|
38711
38722
|
category: ts.Diagnostics.Type_Checking,
|
|
38712
38723
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
38713
|
-
defaultValueDescription:
|
|
38724
|
+
defaultValueDescription: false,
|
|
38714
38725
|
},
|
|
38715
38726
|
{
|
|
38716
38727
|
name: "exactOptionalPropertyTypes",
|
|
@@ -38718,7 +38729,7 @@ var ts;
|
|
|
38718
38729
|
affectsSemanticDiagnostics: true,
|
|
38719
38730
|
category: ts.Diagnostics.Type_Checking,
|
|
38720
38731
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
38721
|
-
defaultValueDescription:
|
|
38732
|
+
defaultValueDescription: false,
|
|
38722
38733
|
},
|
|
38723
38734
|
{
|
|
38724
38735
|
name: "noImplicitReturns",
|
|
@@ -38726,7 +38737,7 @@ var ts;
|
|
|
38726
38737
|
affectsSemanticDiagnostics: true,
|
|
38727
38738
|
category: ts.Diagnostics.Type_Checking,
|
|
38728
38739
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
38729
|
-
defaultValueDescription:
|
|
38740
|
+
defaultValueDescription: false,
|
|
38730
38741
|
},
|
|
38731
38742
|
{
|
|
38732
38743
|
name: "noFallthroughCasesInSwitch",
|
|
@@ -38735,7 +38746,7 @@ var ts;
|
|
|
38735
38746
|
affectsSemanticDiagnostics: true,
|
|
38736
38747
|
category: ts.Diagnostics.Type_Checking,
|
|
38737
38748
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
38738
|
-
defaultValueDescription:
|
|
38749
|
+
defaultValueDescription: false,
|
|
38739
38750
|
},
|
|
38740
38751
|
{
|
|
38741
38752
|
name: "noUncheckedIndexedAccess",
|
|
@@ -38743,7 +38754,7 @@ var ts;
|
|
|
38743
38754
|
affectsSemanticDiagnostics: true,
|
|
38744
38755
|
category: ts.Diagnostics.Type_Checking,
|
|
38745
38756
|
description: ts.Diagnostics.Include_undefined_in_index_signature_results,
|
|
38746
|
-
defaultValueDescription:
|
|
38757
|
+
defaultValueDescription: false,
|
|
38747
38758
|
},
|
|
38748
38759
|
{
|
|
38749
38760
|
name: "noImplicitOverride",
|
|
@@ -38751,7 +38762,7 @@ var ts;
|
|
|
38751
38762
|
affectsSemanticDiagnostics: true,
|
|
38752
38763
|
category: ts.Diagnostics.Type_Checking,
|
|
38753
38764
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
38754
|
-
defaultValueDescription:
|
|
38765
|
+
defaultValueDescription: false,
|
|
38755
38766
|
},
|
|
38756
38767
|
{
|
|
38757
38768
|
name: "noPropertyAccessFromIndexSignature",
|
|
@@ -38759,7 +38770,7 @@ var ts;
|
|
|
38759
38770
|
showInSimplifiedHelpView: false,
|
|
38760
38771
|
category: ts.Diagnostics.Type_Checking,
|
|
38761
38772
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
38762
|
-
defaultValueDescription:
|
|
38773
|
+
defaultValueDescription: false,
|
|
38763
38774
|
},
|
|
38764
38775
|
// Module Resolution
|
|
38765
38776
|
{
|
|
@@ -38853,14 +38864,14 @@ var ts;
|
|
|
38853
38864
|
showInSimplifiedHelpView: true,
|
|
38854
38865
|
category: ts.Diagnostics.Interop_Constraints,
|
|
38855
38866
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
38856
|
-
defaultValueDescription:
|
|
38867
|
+
defaultValueDescription: false,
|
|
38857
38868
|
},
|
|
38858
38869
|
{
|
|
38859
38870
|
name: "preserveSymlinks",
|
|
38860
38871
|
type: "boolean",
|
|
38861
38872
|
category: ts.Diagnostics.Interop_Constraints,
|
|
38862
38873
|
description: ts.Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,
|
|
38863
|
-
defaultValueDescription:
|
|
38874
|
+
defaultValueDescription: false,
|
|
38864
38875
|
},
|
|
38865
38876
|
{
|
|
38866
38877
|
name: "allowUmdGlobalAccess",
|
|
@@ -38868,7 +38879,7 @@ var ts;
|
|
|
38868
38879
|
affectsSemanticDiagnostics: true,
|
|
38869
38880
|
category: ts.Diagnostics.Modules,
|
|
38870
38881
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
38871
|
-
defaultValueDescription:
|
|
38882
|
+
defaultValueDescription: false,
|
|
38872
38883
|
},
|
|
38873
38884
|
// Source Maps
|
|
38874
38885
|
{
|
|
@@ -38893,7 +38904,7 @@ var ts;
|
|
|
38893
38904
|
affectsEmit: true,
|
|
38894
38905
|
category: ts.Diagnostics.Emit,
|
|
38895
38906
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
38896
|
-
defaultValueDescription:
|
|
38907
|
+
defaultValueDescription: false,
|
|
38897
38908
|
},
|
|
38898
38909
|
{
|
|
38899
38910
|
name: "inlineSources",
|
|
@@ -38901,7 +38912,7 @@ var ts;
|
|
|
38901
38912
|
affectsEmit: true,
|
|
38902
38913
|
category: ts.Diagnostics.Emit,
|
|
38903
38914
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
38904
|
-
defaultValueDescription:
|
|
38915
|
+
defaultValueDescription: false,
|
|
38905
38916
|
},
|
|
38906
38917
|
// Experimental
|
|
38907
38918
|
{
|
|
@@ -38910,7 +38921,7 @@ var ts;
|
|
|
38910
38921
|
affectsSemanticDiagnostics: true,
|
|
38911
38922
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38912
38923
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
38913
|
-
defaultValueDescription:
|
|
38924
|
+
defaultValueDescription: false,
|
|
38914
38925
|
},
|
|
38915
38926
|
{
|
|
38916
38927
|
name: "emitDecoratorMetadata",
|
|
@@ -38919,7 +38930,7 @@ var ts;
|
|
|
38919
38930
|
affectsEmit: true,
|
|
38920
38931
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38921
38932
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
38922
|
-
defaultValueDescription:
|
|
38933
|
+
defaultValueDescription: false,
|
|
38923
38934
|
},
|
|
38924
38935
|
// Advanced
|
|
38925
38936
|
{
|
|
@@ -38951,7 +38962,7 @@ var ts;
|
|
|
38951
38962
|
affectsModuleResolution: true,
|
|
38952
38963
|
category: ts.Diagnostics.Modules,
|
|
38953
38964
|
description: ts.Diagnostics.Enable_importing_json_files,
|
|
38954
|
-
defaultValueDescription:
|
|
38965
|
+
defaultValueDescription: false,
|
|
38955
38966
|
},
|
|
38956
38967
|
{
|
|
38957
38968
|
name: "out",
|
|
@@ -38977,7 +38988,7 @@ var ts;
|
|
|
38977
38988
|
type: "boolean",
|
|
38978
38989
|
category: ts.Diagnostics.Completeness,
|
|
38979
38990
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
38980
|
-
defaultValueDescription:
|
|
38991
|
+
defaultValueDescription: false,
|
|
38981
38992
|
},
|
|
38982
38993
|
{
|
|
38983
38994
|
name: "charset",
|
|
@@ -38992,7 +39003,7 @@ var ts;
|
|
|
38992
39003
|
affectsEmit: true,
|
|
38993
39004
|
category: ts.Diagnostics.Emit,
|
|
38994
39005
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
38995
|
-
defaultValueDescription:
|
|
39006
|
+
defaultValueDescription: false,
|
|
38996
39007
|
},
|
|
38997
39008
|
{
|
|
38998
39009
|
name: "newLine",
|
|
@@ -39012,7 +39023,7 @@ var ts;
|
|
|
39012
39023
|
affectsSemanticDiagnostics: true,
|
|
39013
39024
|
category: ts.Diagnostics.Output_Formatting,
|
|
39014
39025
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
39015
|
-
defaultValueDescription:
|
|
39026
|
+
defaultValueDescription: false,
|
|
39016
39027
|
},
|
|
39017
39028
|
{
|
|
39018
39029
|
name: "noLib",
|
|
@@ -39023,7 +39034,7 @@ var ts;
|
|
|
39023
39034
|
// We are not returning a sourceFile for lib file when asked by the program,
|
|
39024
39035
|
// so pass --noLib to avoid reporting a file not found error.
|
|
39025
39036
|
transpileOptionValue: true,
|
|
39026
|
-
defaultValueDescription:
|
|
39037
|
+
defaultValueDescription: false,
|
|
39027
39038
|
},
|
|
39028
39039
|
{
|
|
39029
39040
|
name: "noResolve",
|
|
@@ -39034,7 +39045,7 @@ var ts;
|
|
|
39034
39045
|
// We are not doing a full typecheck, we are not resolving the whole context,
|
|
39035
39046
|
// so pass --noResolve to avoid reporting missing file errors.
|
|
39036
39047
|
transpileOptionValue: true,
|
|
39037
|
-
defaultValueDescription:
|
|
39048
|
+
defaultValueDescription: false,
|
|
39038
39049
|
},
|
|
39039
39050
|
{
|
|
39040
39051
|
name: "stripInternal",
|
|
@@ -39042,7 +39053,7 @@ var ts;
|
|
|
39042
39053
|
affectsEmit: true,
|
|
39043
39054
|
category: ts.Diagnostics.Emit,
|
|
39044
39055
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
39045
|
-
defaultValueDescription:
|
|
39056
|
+
defaultValueDescription: false,
|
|
39046
39057
|
},
|
|
39047
39058
|
{
|
|
39048
39059
|
name: "disableSizeLimit",
|
|
@@ -39050,7 +39061,7 @@ var ts;
|
|
|
39050
39061
|
affectsProgramStructure: true,
|
|
39051
39062
|
category: ts.Diagnostics.Editor_Support,
|
|
39052
39063
|
description: ts.Diagnostics.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,
|
|
39053
|
-
defaultValueDescription:
|
|
39064
|
+
defaultValueDescription: false,
|
|
39054
39065
|
},
|
|
39055
39066
|
{
|
|
39056
39067
|
name: "disableSourceOfProjectReferenceRedirect",
|
|
@@ -39058,7 +39069,7 @@ var ts;
|
|
|
39058
39069
|
isTSConfigOnly: true,
|
|
39059
39070
|
category: ts.Diagnostics.Projects,
|
|
39060
39071
|
description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,
|
|
39061
|
-
defaultValueDescription:
|
|
39072
|
+
defaultValueDescription: false,
|
|
39062
39073
|
},
|
|
39063
39074
|
{
|
|
39064
39075
|
name: "disableSolutionSearching",
|
|
@@ -39066,7 +39077,7 @@ var ts;
|
|
|
39066
39077
|
isTSConfigOnly: true,
|
|
39067
39078
|
category: ts.Diagnostics.Projects,
|
|
39068
39079
|
description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,
|
|
39069
|
-
defaultValueDescription:
|
|
39080
|
+
defaultValueDescription: false,
|
|
39070
39081
|
},
|
|
39071
39082
|
{
|
|
39072
39083
|
name: "disableReferencedProjectLoad",
|
|
@@ -39074,7 +39085,7 @@ var ts;
|
|
|
39074
39085
|
isTSConfigOnly: true,
|
|
39075
39086
|
category: ts.Diagnostics.Projects,
|
|
39076
39087
|
description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,
|
|
39077
|
-
defaultValueDescription:
|
|
39088
|
+
defaultValueDescription: false,
|
|
39078
39089
|
},
|
|
39079
39090
|
{
|
|
39080
39091
|
name: "noImplicitUseStrict",
|
|
@@ -39082,7 +39093,7 @@ var ts;
|
|
|
39082
39093
|
affectsSemanticDiagnostics: true,
|
|
39083
39094
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39084
39095
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
39085
|
-
defaultValueDescription:
|
|
39096
|
+
defaultValueDescription: false,
|
|
39086
39097
|
},
|
|
39087
39098
|
{
|
|
39088
39099
|
name: "noEmitHelpers",
|
|
@@ -39090,7 +39101,7 @@ var ts;
|
|
|
39090
39101
|
affectsEmit: true,
|
|
39091
39102
|
category: ts.Diagnostics.Emit,
|
|
39092
39103
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
39093
|
-
defaultValueDescription:
|
|
39104
|
+
defaultValueDescription: false,
|
|
39094
39105
|
},
|
|
39095
39106
|
{
|
|
39096
39107
|
name: "noEmitOnError",
|
|
@@ -39099,7 +39110,7 @@ var ts;
|
|
|
39099
39110
|
category: ts.Diagnostics.Emit,
|
|
39100
39111
|
transpileOptionValue: undefined,
|
|
39101
39112
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
39102
|
-
defaultValueDescription:
|
|
39113
|
+
defaultValueDescription: false,
|
|
39103
39114
|
},
|
|
39104
39115
|
{
|
|
39105
39116
|
name: "preserveConstEnums",
|
|
@@ -39107,7 +39118,7 @@ var ts;
|
|
|
39107
39118
|
affectsEmit: true,
|
|
39108
39119
|
category: ts.Diagnostics.Emit,
|
|
39109
39120
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
39110
|
-
defaultValueDescription:
|
|
39121
|
+
defaultValueDescription: false,
|
|
39111
39122
|
},
|
|
39112
39123
|
{
|
|
39113
39124
|
name: "declarationDir",
|
|
@@ -39124,7 +39135,7 @@ var ts;
|
|
|
39124
39135
|
type: "boolean",
|
|
39125
39136
|
category: ts.Diagnostics.Completeness,
|
|
39126
39137
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
39127
|
-
defaultValueDescription:
|
|
39138
|
+
defaultValueDescription: false,
|
|
39128
39139
|
},
|
|
39129
39140
|
{
|
|
39130
39141
|
name: "allowUnusedLabels",
|
|
@@ -39133,7 +39144,7 @@ var ts;
|
|
|
39133
39144
|
affectsSemanticDiagnostics: true,
|
|
39134
39145
|
category: ts.Diagnostics.Type_Checking,
|
|
39135
39146
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
39136
|
-
defaultValueDescription:
|
|
39147
|
+
defaultValueDescription: undefined,
|
|
39137
39148
|
},
|
|
39138
39149
|
{
|
|
39139
39150
|
name: "allowUnreachableCode",
|
|
@@ -39142,7 +39153,7 @@ var ts;
|
|
|
39142
39153
|
affectsSemanticDiagnostics: true,
|
|
39143
39154
|
category: ts.Diagnostics.Type_Checking,
|
|
39144
39155
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
39145
|
-
defaultValueDescription:
|
|
39156
|
+
defaultValueDescription: undefined,
|
|
39146
39157
|
},
|
|
39147
39158
|
{
|
|
39148
39159
|
name: "suppressExcessPropertyErrors",
|
|
@@ -39150,7 +39161,7 @@ var ts;
|
|
|
39150
39161
|
affectsSemanticDiagnostics: true,
|
|
39151
39162
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39152
39163
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
39153
|
-
defaultValueDescription:
|
|
39164
|
+
defaultValueDescription: false,
|
|
39154
39165
|
},
|
|
39155
39166
|
{
|
|
39156
39167
|
name: "suppressImplicitAnyIndexErrors",
|
|
@@ -39158,7 +39169,7 @@ var ts;
|
|
|
39158
39169
|
affectsSemanticDiagnostics: true,
|
|
39159
39170
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39160
39171
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
39161
|
-
defaultValueDescription:
|
|
39172
|
+
defaultValueDescription: false,
|
|
39162
39173
|
},
|
|
39163
39174
|
{
|
|
39164
39175
|
name: "forceConsistentCasingInFileNames",
|
|
@@ -39166,7 +39177,7 @@ var ts;
|
|
|
39166
39177
|
affectsModuleResolution: true,
|
|
39167
39178
|
category: ts.Diagnostics.Interop_Constraints,
|
|
39168
39179
|
description: ts.Diagnostics.Ensure_that_casing_is_correct_in_imports,
|
|
39169
|
-
defaultValueDescription:
|
|
39180
|
+
defaultValueDescription: false,
|
|
39170
39181
|
},
|
|
39171
39182
|
{
|
|
39172
39183
|
name: "maxNodeModuleJsDepth",
|
|
@@ -39174,7 +39185,7 @@ var ts;
|
|
|
39174
39185
|
affectsModuleResolution: true,
|
|
39175
39186
|
category: ts.Diagnostics.JavaScript_Support,
|
|
39176
39187
|
description: ts.Diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,
|
|
39177
|
-
defaultValueDescription:
|
|
39188
|
+
defaultValueDescription: 0,
|
|
39178
39189
|
},
|
|
39179
39190
|
{
|
|
39180
39191
|
name: "noStrictGenericChecks",
|
|
@@ -39182,7 +39193,7 @@ var ts;
|
|
|
39182
39193
|
affectsSemanticDiagnostics: true,
|
|
39183
39194
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39184
39195
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
39185
|
-
defaultValueDescription:
|
|
39196
|
+
defaultValueDescription: false,
|
|
39186
39197
|
},
|
|
39187
39198
|
{
|
|
39188
39199
|
name: "useDefineForClassFields",
|
|
@@ -39199,14 +39210,14 @@ var ts;
|
|
|
39199
39210
|
affectsEmit: true,
|
|
39200
39211
|
category: ts.Diagnostics.Emit,
|
|
39201
39212
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
39202
|
-
defaultValueDescription:
|
|
39213
|
+
defaultValueDescription: false,
|
|
39203
39214
|
},
|
|
39204
39215
|
{
|
|
39205
39216
|
name: "keyofStringsOnly",
|
|
39206
39217
|
type: "boolean",
|
|
39207
39218
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39208
39219
|
description: ts.Diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,
|
|
39209
|
-
defaultValueDescription:
|
|
39220
|
+
defaultValueDescription: false,
|
|
39210
39221
|
},
|
|
39211
39222
|
{
|
|
39212
39223
|
// A list of plugins to load in the language service
|
|
@@ -39248,7 +39259,7 @@ var ts;
|
|
|
39248
39259
|
category: ts.Diagnostics.Command_line_Options,
|
|
39249
39260
|
description: ts.Diagnostics.Enable_verbose_logging,
|
|
39250
39261
|
type: "boolean",
|
|
39251
|
-
defaultValueDescription:
|
|
39262
|
+
defaultValueDescription: false,
|
|
39252
39263
|
},
|
|
39253
39264
|
{
|
|
39254
39265
|
name: "dry",
|
|
@@ -39256,7 +39267,7 @@ var ts;
|
|
|
39256
39267
|
category: ts.Diagnostics.Command_line_Options,
|
|
39257
39268
|
description: ts.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,
|
|
39258
39269
|
type: "boolean",
|
|
39259
|
-
defaultValueDescription:
|
|
39270
|
+
defaultValueDescription: false,
|
|
39260
39271
|
},
|
|
39261
39272
|
{
|
|
39262
39273
|
name: "force",
|
|
@@ -39264,14 +39275,14 @@ var ts;
|
|
|
39264
39275
|
category: ts.Diagnostics.Command_line_Options,
|
|
39265
39276
|
description: ts.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,
|
|
39266
39277
|
type: "boolean",
|
|
39267
|
-
defaultValueDescription:
|
|
39278
|
+
defaultValueDescription: false,
|
|
39268
39279
|
},
|
|
39269
39280
|
{
|
|
39270
39281
|
name: "clean",
|
|
39271
39282
|
category: ts.Diagnostics.Command_line_Options,
|
|
39272
39283
|
description: ts.Diagnostics.Delete_the_outputs_of_all_projects,
|
|
39273
39284
|
type: "boolean",
|
|
39274
|
-
defaultValueDescription:
|
|
39285
|
+
defaultValueDescription: false,
|
|
39275
39286
|
}
|
|
39276
39287
|
];
|
|
39277
39288
|
/* @internal */
|
|
@@ -39284,12 +39295,12 @@ var ts;
|
|
|
39284
39295
|
*/
|
|
39285
39296
|
name: "enableAutoDiscovery",
|
|
39286
39297
|
type: "boolean",
|
|
39287
|
-
defaultValueDescription:
|
|
39298
|
+
defaultValueDescription: false,
|
|
39288
39299
|
},
|
|
39289
39300
|
{
|
|
39290
39301
|
name: "enable",
|
|
39291
39302
|
type: "boolean",
|
|
39292
|
-
defaultValueDescription:
|
|
39303
|
+
defaultValueDescription: false,
|
|
39293
39304
|
},
|
|
39294
39305
|
{
|
|
39295
39306
|
name: "include",
|
|
@@ -39310,7 +39321,7 @@ var ts;
|
|
|
39310
39321
|
{
|
|
39311
39322
|
name: "disableFilenameBasedTypeAcquisition",
|
|
39312
39323
|
type: "boolean",
|
|
39313
|
-
defaultValueDescription:
|
|
39324
|
+
defaultValueDescription: false,
|
|
39314
39325
|
},
|
|
39315
39326
|
];
|
|
39316
39327
|
/*@internal*/
|
|
@@ -86623,18 +86634,22 @@ var ts;
|
|
|
86623
86634
|
return false;
|
|
86624
86635
|
}
|
|
86625
86636
|
function checkNumericLiteralValueSize(node) {
|
|
86637
|
+
// We should test against `getTextOfNode(node)` rather than `node.text`, because `node.text` for large numeric literals can contain "."
|
|
86638
|
+
// e.g. `node.text` for numeric literal `1100000000000000000000` is `1.1e21`.
|
|
86639
|
+
var isFractional = ts.getTextOfNode(node).indexOf(".") !== -1;
|
|
86640
|
+
var isScientific = node.numericLiteralFlags & 16 /* Scientific */;
|
|
86626
86641
|
// Scientific notation (e.g. 2e54 and 1e00000000010) can't be converted to bigint
|
|
86627
|
-
// Literals with 15 or fewer characters aren't long enough to reach past 2^53 - 1
|
|
86628
86642
|
// Fractional numbers (e.g. 9000000000000000.001) are inherently imprecise anyway
|
|
86629
|
-
if (
|
|
86643
|
+
if (isFractional || isScientific) {
|
|
86630
86644
|
return;
|
|
86631
86645
|
}
|
|
86632
|
-
//
|
|
86633
|
-
//
|
|
86634
|
-
//
|
|
86635
|
-
//
|
|
86636
|
-
|
|
86637
|
-
|
|
86646
|
+
// Here `node` is guaranteed to be a numeric literal representing an integer.
|
|
86647
|
+
// We need to judge whether the integer `node` represents is <= 2 ** 53 - 1, which can be accomplished by comparing to `value` defined below because:
|
|
86648
|
+
// 1) when `node` represents an integer <= 2 ** 53 - 1, `node.text` is its exact string representation and thus `value` precisely represents the integer.
|
|
86649
|
+
// 2) otherwise, although `node.text` may be imprecise string representation, its mathematical value and consequently `value` cannot be less than 2 ** 53,
|
|
86650
|
+
// thus the result of the predicate won't be affected.
|
|
86651
|
+
var value = +node.text;
|
|
86652
|
+
if (value <= Math.pow(2, 53) - 1) {
|
|
86638
86653
|
return;
|
|
86639
86654
|
}
|
|
86640
86655
|
addErrorOrSuggestion(/*isError*/ false, ts.createDiagnosticForNode(node, ts.Diagnostics.Numeric_literals_with_absolute_values_equal_to_2_53_or_greater_are_too_large_to_be_represented_accurately_as_integers));
|
|
@@ -90096,7 +90111,7 @@ var ts;
|
|
|
90096
90111
|
// ], C.prototype, "prop");
|
|
90097
90112
|
//
|
|
90098
90113
|
var prefix = getClassMemberPrefix(node, member);
|
|
90099
|
-
var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/
|
|
90114
|
+
var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ !ts.hasSyntacticModifier(member, 2 /* Ambient */));
|
|
90100
90115
|
var descriptor = languageVersion > 0 /* ES3 */
|
|
90101
90116
|
? member.kind === 166 /* PropertyDeclaration */
|
|
90102
90117
|
// We emit `void 0` here to indicate to `__decorate` that it can invoke `Object.defineProperty` directly, but that it
|
|
@@ -90910,11 +90925,10 @@ var ts;
|
|
|
90910
90925
|
// we can safely elide the parentheses here, as a new synthetic
|
|
90911
90926
|
// ParenthesizedExpression will be inserted if we remove parentheses too
|
|
90912
90927
|
// aggressively.
|
|
90913
|
-
//
|
|
90914
|
-
//
|
|
90915
|
-
|
|
90916
|
-
|
|
90917
|
-
}
|
|
90928
|
+
//
|
|
90929
|
+
// If there are leading comments on the expression itself, the emitter will handle ASI
|
|
90930
|
+
// for return, throw, and yield by re-introducing parenthesis during emit on an as-need
|
|
90931
|
+
// basis.
|
|
90918
90932
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
90919
90933
|
}
|
|
90920
90934
|
return ts.visitEachChild(node, visitor, context);
|
|
@@ -94862,11 +94876,11 @@ var ts;
|
|
|
94862
94876
|
}
|
|
94863
94877
|
function visitOptionalExpression(node, captureThisArg, isDelete) {
|
|
94864
94878
|
var _a = flattenChain(node), expression = _a.expression, chain = _a.chain;
|
|
94865
|
-
var left = visitNonOptionalExpression(expression, ts.isCallChain(chain[0]), /*isDelete*/ false);
|
|
94879
|
+
var left = visitNonOptionalExpression(ts.skipPartiallyEmittedExpressions(expression), ts.isCallChain(chain[0]), /*isDelete*/ false);
|
|
94866
94880
|
var leftThisArg = ts.isSyntheticReference(left) ? left.thisArg : undefined;
|
|
94867
|
-
var
|
|
94868
|
-
var
|
|
94869
|
-
if (!ts.isSimpleCopiableExpression(
|
|
94881
|
+
var capturedLeft = ts.isSyntheticReference(left) ? left.expression : left;
|
|
94882
|
+
var leftExpression = factory.restoreOuterExpressions(expression, capturedLeft, 8 /* PartiallyEmittedExpressions */);
|
|
94883
|
+
if (!ts.isSimpleCopiableExpression(capturedLeft)) {
|
|
94870
94884
|
capturedLeft = factory.createTempVariable(hoistVariableDeclaration);
|
|
94871
94885
|
leftExpression = factory.createAssignment(capturedLeft, leftExpression);
|
|
94872
94886
|
}
|
|
@@ -94892,6 +94906,10 @@ var ts;
|
|
|
94892
94906
|
break;
|
|
94893
94907
|
case 207 /* CallExpression */:
|
|
94894
94908
|
if (i === 0 && leftThisArg) {
|
|
94909
|
+
if (!ts.isGeneratedIdentifier(leftThisArg)) {
|
|
94910
|
+
leftThisArg = factory.cloneNode(leftThisArg);
|
|
94911
|
+
ts.addEmitFlags(leftThisArg, 1536 /* NoComments */);
|
|
94912
|
+
}
|
|
94895
94913
|
rightExpression = factory.createFunctionCallCall(rightExpression, leftThisArg.kind === 106 /* SuperKeyword */ ? factory.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression));
|
|
94896
94914
|
}
|
|
94897
94915
|
else {
|
|
@@ -109674,7 +109692,7 @@ var ts;
|
|
|
109674
109692
|
function emitYieldExpression(node) {
|
|
109675
109693
|
emitTokenWithComment(125 /* YieldKeyword */, node.pos, writeKeyword, node);
|
|
109676
109694
|
emit(node.asteriskToken);
|
|
109677
|
-
emitExpressionWithLeadingSpace(node.expression
|
|
109695
|
+
emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsiAndDisallowedComma);
|
|
109678
109696
|
}
|
|
109679
109697
|
function emitSpreadElement(node) {
|
|
109680
109698
|
emitTokenWithComment(25 /* DotDotDotToken */, node.pos, writePunctuation, node);
|
|
@@ -109871,9 +109889,49 @@ var ts;
|
|
|
109871
109889
|
}
|
|
109872
109890
|
return pos;
|
|
109873
109891
|
}
|
|
109892
|
+
function commentWillEmitNewLine(node) {
|
|
109893
|
+
return node.kind === 2 /* SingleLineCommentTrivia */ || !!node.hasTrailingNewLine;
|
|
109894
|
+
}
|
|
109895
|
+
function willEmitLeadingNewLine(node) {
|
|
109896
|
+
if (!currentSourceFile)
|
|
109897
|
+
return false;
|
|
109898
|
+
if (ts.some(ts.getLeadingCommentRanges(currentSourceFile.text, node.pos), commentWillEmitNewLine))
|
|
109899
|
+
return true;
|
|
109900
|
+
if (ts.some(ts.getSyntheticLeadingComments(node), commentWillEmitNewLine))
|
|
109901
|
+
return true;
|
|
109902
|
+
if (ts.isPartiallyEmittedExpression(node)) {
|
|
109903
|
+
if (node.pos !== node.expression.pos) {
|
|
109904
|
+
if (ts.some(ts.getTrailingCommentRanges(currentSourceFile.text, node.expression.pos), commentWillEmitNewLine))
|
|
109905
|
+
return true;
|
|
109906
|
+
}
|
|
109907
|
+
return willEmitLeadingNewLine(node.expression);
|
|
109908
|
+
}
|
|
109909
|
+
return false;
|
|
109910
|
+
}
|
|
109911
|
+
/**
|
|
109912
|
+
* Wraps an expression in parens if we would emit a leading comment that would introduce a line separator
|
|
109913
|
+
* between the node and its parent.
|
|
109914
|
+
*/
|
|
109915
|
+
function parenthesizeExpressionForNoAsi(node) {
|
|
109916
|
+
if (!commentsDisabled && ts.isPartiallyEmittedExpression(node) && willEmitLeadingNewLine(node)) {
|
|
109917
|
+
var parseNode = ts.getParseTreeNode(node);
|
|
109918
|
+
if (parseNode && ts.isParenthesizedExpression(parseNode)) {
|
|
109919
|
+
// If the original node was a parenthesized expression, restore it to preserve comment and source map emit
|
|
109920
|
+
var parens = ts.factory.createParenthesizedExpression(node.expression);
|
|
109921
|
+
ts.setOriginalNode(parens, node);
|
|
109922
|
+
ts.setTextRange(parens, parseNode);
|
|
109923
|
+
return parens;
|
|
109924
|
+
}
|
|
109925
|
+
return ts.factory.createParenthesizedExpression(node);
|
|
109926
|
+
}
|
|
109927
|
+
return node;
|
|
109928
|
+
}
|
|
109929
|
+
function parenthesizeExpressionForNoAsiAndDisallowedComma(node) {
|
|
109930
|
+
return parenthesizeExpressionForNoAsi(parenthesizer.parenthesizeExpressionForDisallowedComma(node));
|
|
109931
|
+
}
|
|
109874
109932
|
function emitReturnStatement(node) {
|
|
109875
109933
|
emitTokenWithComment(105 /* ReturnKeyword */, node.pos, writeKeyword, /*contextNode*/ node);
|
|
109876
|
-
emitExpressionWithLeadingSpace(node.expression);
|
|
109934
|
+
emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi);
|
|
109877
109935
|
writeTrailingSemicolon();
|
|
109878
109936
|
}
|
|
109879
109937
|
function emitWithStatement(node) {
|
|
@@ -109901,7 +109959,7 @@ var ts;
|
|
|
109901
109959
|
}
|
|
109902
109960
|
function emitThrowStatement(node) {
|
|
109903
109961
|
emitTokenWithComment(109 /* ThrowKeyword */, node.pos, writeKeyword, node);
|
|
109904
|
-
emitExpressionWithLeadingSpace(node.expression);
|
|
109962
|
+
emitExpressionWithLeadingSpace(parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi);
|
|
109905
109963
|
writeTrailingSemicolon();
|
|
109906
109964
|
}
|
|
109907
109965
|
function emitTryStatement(node) {
|
|
@@ -110745,7 +110803,14 @@ var ts;
|
|
|
110745
110803
|
}
|
|
110746
110804
|
// Transformation nodes
|
|
110747
110805
|
function emitPartiallyEmittedExpression(node) {
|
|
110806
|
+
var emitFlags = ts.getEmitFlags(node);
|
|
110807
|
+
if (!(emitFlags & 512 /* NoLeadingComments */) && node.pos !== node.expression.pos) {
|
|
110808
|
+
emitTrailingCommentsOfPosition(node.expression.pos);
|
|
110809
|
+
}
|
|
110748
110810
|
emitExpression(node.expression);
|
|
110811
|
+
if (!(emitFlags & 1024 /* NoTrailingComments */) && node.end !== node.expression.end) {
|
|
110812
|
+
emitLeadingCommentsOfPosition(node.expression.end);
|
|
110813
|
+
}
|
|
110749
110814
|
}
|
|
110750
110815
|
function emitCommaList(node) {
|
|
110751
110816
|
emitExpressionList(node, node.elements, 528 /* CommaListElements */, /*parenthesizerRule*/ undefined);
|
|
@@ -111109,10 +111174,8 @@ var ts;
|
|
|
111109
111174
|
// Emit this child.
|
|
111110
111175
|
previousSourceFileTextKind = recordBundleFileInternalSectionStart(child);
|
|
111111
111176
|
if (shouldEmitInterveningComments) {
|
|
111112
|
-
|
|
111113
|
-
|
|
111114
|
-
emitTrailingCommentsOfPosition(commentRange.pos);
|
|
111115
|
-
}
|
|
111177
|
+
var commentRange = ts.getCommentRange(child);
|
|
111178
|
+
emitTrailingCommentsOfPosition(commentRange.pos);
|
|
111116
111179
|
}
|
|
111117
111180
|
else {
|
|
111118
111181
|
shouldEmitInterveningComments = mayEmitInterveningComments;
|
|
@@ -111433,7 +111496,7 @@ var ts;
|
|
|
111433
111496
|
function writeLineSeparatorsAndIndentBefore(node, parent) {
|
|
111434
111497
|
var leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent, [node], 0 /* None */);
|
|
111435
111498
|
if (leadingNewlines) {
|
|
111436
|
-
writeLinesAndIndent(leadingNewlines, /*
|
|
111499
|
+
writeLinesAndIndent(leadingNewlines, /*writeSpaceIfNotIndenting*/ false);
|
|
111437
111500
|
}
|
|
111438
111501
|
return !!leadingNewlines;
|
|
111439
111502
|
}
|
|
@@ -125423,7 +125486,6 @@ var ts;
|
|
|
125423
125486
|
|| kind === 165 /* PropertySignature */
|
|
125424
125487
|
|| kind === 167 /* MethodSignature */;
|
|
125425
125488
|
}
|
|
125426
|
-
ts.syntaxRequiresTrailingCommaOrSemicolonOrASI = syntaxRequiresTrailingCommaOrSemicolonOrASI;
|
|
125427
125489
|
function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) {
|
|
125428
125490
|
return kind === 255 /* FunctionDeclaration */
|
|
125429
125491
|
|| kind === 170 /* Constructor */
|
|
@@ -125431,11 +125493,9 @@ var ts;
|
|
|
125431
125493
|
|| kind === 171 /* GetAccessor */
|
|
125432
125494
|
|| kind === 172 /* SetAccessor */;
|
|
125433
125495
|
}
|
|
125434
|
-
ts.syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI = syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI;
|
|
125435
125496
|
function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) {
|
|
125436
125497
|
return kind === 260 /* ModuleDeclaration */;
|
|
125437
125498
|
}
|
|
125438
|
-
ts.syntaxRequiresTrailingModuleBlockOrSemicolonOrASI = syntaxRequiresTrailingModuleBlockOrSemicolonOrASI;
|
|
125439
125499
|
function syntaxRequiresTrailingSemicolonOrASI(kind) {
|
|
125440
125500
|
return kind === 236 /* VariableStatement */
|
|
125441
125501
|
|| kind === 237 /* ExpressionStatement */
|
|
@@ -125510,19 +125570,34 @@ var ts;
|
|
|
125510
125570
|
ts.forEachChild(sourceFile, function visit(node) {
|
|
125511
125571
|
if (syntaxRequiresTrailingSemicolonOrASI(node.kind)) {
|
|
125512
125572
|
var lastToken = node.getLastToken(sourceFile);
|
|
125513
|
-
if (lastToken
|
|
125573
|
+
if ((lastToken === null || lastToken === void 0 ? void 0 : lastToken.kind) === 26 /* SemicolonToken */) {
|
|
125514
125574
|
withSemicolon++;
|
|
125515
125575
|
}
|
|
125516
125576
|
else {
|
|
125517
125577
|
withoutSemicolon++;
|
|
125518
125578
|
}
|
|
125519
125579
|
}
|
|
125580
|
+
else if (syntaxRequiresTrailingCommaOrSemicolonOrASI(node.kind)) {
|
|
125581
|
+
var lastToken = node.getLastToken(sourceFile);
|
|
125582
|
+
if ((lastToken === null || lastToken === void 0 ? void 0 : lastToken.kind) === 26 /* SemicolonToken */) {
|
|
125583
|
+
withSemicolon++;
|
|
125584
|
+
}
|
|
125585
|
+
else if (lastToken && lastToken.kind !== 27 /* CommaToken */) {
|
|
125586
|
+
var lastTokenLine = ts.getLineAndCharacterOfPosition(sourceFile, lastToken.getStart(sourceFile)).line;
|
|
125587
|
+
var nextTokenLine = ts.getLineAndCharacterOfPosition(sourceFile, ts.getSpanOfTokenAtPosition(sourceFile, lastToken.end).start).line;
|
|
125588
|
+
// Avoid counting missing semicolon in single-line objects:
|
|
125589
|
+
// `function f(p: { x: string /*no semicolon here is insignificant*/ }) {`
|
|
125590
|
+
if (lastTokenLine !== nextTokenLine) {
|
|
125591
|
+
withoutSemicolon++;
|
|
125592
|
+
}
|
|
125593
|
+
}
|
|
125594
|
+
}
|
|
125520
125595
|
if (withSemicolon + withoutSemicolon >= nStatementsToObserve) {
|
|
125521
125596
|
return true;
|
|
125522
125597
|
}
|
|
125523
125598
|
return ts.forEachChild(node, visit);
|
|
125524
125599
|
});
|
|
125525
|
-
// One statement missing a semicolon isn
|
|
125600
|
+
// One statement missing a semicolon isn't sufficient evidence to say the user
|
|
125526
125601
|
// doesn’t want semicolons, because they may not even be done writing that statement.
|
|
125527
125602
|
if (withSemicolon === 0 && withoutSemicolon <= 1) {
|
|
125528
125603
|
return true;
|
|
@@ -141388,6 +141463,7 @@ var ts;
|
|
|
141388
141463
|
lastTrailingTriviaWasNewLine: function () { return wasNewLine; },
|
|
141389
141464
|
skipToEndOf: skipToEndOf,
|
|
141390
141465
|
skipToStartOf: skipToStartOf,
|
|
141466
|
+
getStartPos: function () { var _a; return (_a = lastTokenInfo === null || lastTokenInfo === void 0 ? void 0 : lastTokenInfo.token.pos) !== null && _a !== void 0 ? _a : scanner.getTokenPos(); },
|
|
141391
141467
|
});
|
|
141392
141468
|
lastTokenInfo = undefined;
|
|
141393
141469
|
scanner.setText(undefined);
|
|
@@ -141561,8 +141637,7 @@ var ts;
|
|
|
141561
141637
|
}
|
|
141562
141638
|
function isOnToken() {
|
|
141563
141639
|
var current = lastTokenInfo ? lastTokenInfo.token.kind : scanner.getToken();
|
|
141564
|
-
|
|
141565
|
-
return startPos < endPos && current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current);
|
|
141640
|
+
return current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current);
|
|
141566
141641
|
}
|
|
141567
141642
|
function isOnEOF() {
|
|
141568
141643
|
var current = lastTokenInfo ? lastTokenInfo.token.kind : scanner.getToken();
|
|
@@ -142750,7 +142825,7 @@ var ts;
|
|
|
142750
142825
|
return 0;
|
|
142751
142826
|
}
|
|
142752
142827
|
function formatNodeGivenIndentation(node, sourceFileLike, languageVariant, initialIndentation, delta, formatContext) {
|
|
142753
|
-
var range = { pos:
|
|
142828
|
+
var range = { pos: node.pos, end: node.end };
|
|
142754
142829
|
return formatting.getFormattingScanner(sourceFileLike.text, languageVariant, range.pos, range.end, function (scanner) { return formatSpanWorker(range, node, initialIndentation, delta, scanner, formatContext, 1 /* FormatSelection */, function (_) { return false; }, // assume that node does not have any errors
|
|
142755
142830
|
sourceFileLike); });
|
|
142756
142831
|
}
|
|
@@ -142801,6 +142876,15 @@ var ts;
|
|
|
142801
142876
|
}
|
|
142802
142877
|
}
|
|
142803
142878
|
}
|
|
142879
|
+
if (previousRange && formattingScanner.getStartPos() >= originalRange.end) {
|
|
142880
|
+
var token = formattingScanner.isOnEOF() ? formattingScanner.readEOFTokenRange() :
|
|
142881
|
+
formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(enclosingNode).token :
|
|
142882
|
+
undefined;
|
|
142883
|
+
if (token) {
|
|
142884
|
+
processPair(token, sourceFile.getLineAndCharacterOfPosition(token.pos).line, enclosingNode, previousRange, previousRangeStartLine, previousParent, enclosingNode,
|
|
142885
|
+
/*dynamicIndentation*/ undefined);
|
|
142886
|
+
}
|
|
142887
|
+
}
|
|
142804
142888
|
return edits;
|
|
142805
142889
|
// local functions
|
|
142806
142890
|
/** Tries to compute the indentation for a list element.
|
|
@@ -142983,19 +143067,13 @@ var ts;
|
|
|
142983
143067
|
processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation);
|
|
142984
143068
|
});
|
|
142985
143069
|
// proceed any tokens in the node that are located after child nodes
|
|
142986
|
-
while (formattingScanner.isOnToken()) {
|
|
143070
|
+
while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) {
|
|
142987
143071
|
var tokenInfo = formattingScanner.readTokenInfo(node);
|
|
142988
|
-
if (tokenInfo.token.end > node.end) {
|
|
143072
|
+
if (tokenInfo.token.end > Math.min(node.end, originalRange.end)) {
|
|
142989
143073
|
break;
|
|
142990
143074
|
}
|
|
142991
143075
|
consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node);
|
|
142992
143076
|
}
|
|
142993
|
-
if (!node.parent && formattingScanner.isOnEOF()) {
|
|
142994
|
-
var token = formattingScanner.readEOFTokenRange();
|
|
142995
|
-
if (token.end <= node.end && previousRange) {
|
|
142996
|
-
processPair(token, sourceFile.getLineAndCharacterOfPosition(token.pos).line, node, previousRange, previousRangeStartLine, previousParent, contextNode, nodeDynamicIndentation);
|
|
142997
|
-
}
|
|
142998
|
-
}
|
|
142999
143077
|
function processChildNode(child, inheritedIndentation, parent, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) {
|
|
143000
143078
|
var childStartPos = child.getStart(sourceFile);
|
|
143001
143079
|
var childStartLine = sourceFile.getLineAndCharacterOfPosition(childStartPos).line;
|
|
@@ -143021,9 +143099,12 @@ var ts;
|
|
|
143021
143099
|
if (child.getFullWidth() === 0) {
|
|
143022
143100
|
return inheritedIndentation;
|
|
143023
143101
|
}
|
|
143024
|
-
while (formattingScanner.isOnToken()) {
|
|
143102
|
+
while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) {
|
|
143025
143103
|
// proceed any parent tokens that are located prior to child.getStart()
|
|
143026
143104
|
var tokenInfo = formattingScanner.readTokenInfo(node);
|
|
143105
|
+
if (tokenInfo.token.end > originalRange.end) {
|
|
143106
|
+
return inheritedIndentation;
|
|
143107
|
+
}
|
|
143027
143108
|
if (tokenInfo.token.end > childStartPos) {
|
|
143028
143109
|
if (tokenInfo.token.pos > childStartPos) {
|
|
143029
143110
|
formattingScanner.skipToStartOf(child);
|
|
@@ -143033,7 +143114,7 @@ var ts;
|
|
|
143033
143114
|
}
|
|
143034
143115
|
consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node);
|
|
143035
143116
|
}
|
|
143036
|
-
if (!formattingScanner.isOnToken()) {
|
|
143117
|
+
if (!formattingScanner.isOnToken() || formattingScanner.getStartPos() >= originalRange.end) {
|
|
143037
143118
|
return inheritedIndentation;
|
|
143038
143119
|
}
|
|
143039
143120
|
if (ts.isToken(child)) {
|
|
@@ -143062,7 +143143,7 @@ var ts;
|
|
|
143062
143143
|
var startLine = parentStartLine;
|
|
143063
143144
|
if (listStartToken !== 0 /* Unknown */) {
|
|
143064
143145
|
// introduce a new indentation scope for lists (including list start and end tokens)
|
|
143065
|
-
while (formattingScanner.isOnToken()) {
|
|
143146
|
+
while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) {
|
|
143066
143147
|
var tokenInfo = formattingScanner.readTokenInfo(parent);
|
|
143067
143148
|
if (tokenInfo.token.end > nodes.pos) {
|
|
143068
143149
|
// stop when formatting scanner moves past the beginning of node list
|
|
@@ -143098,7 +143179,7 @@ var ts;
|
|
|
143098
143179
|
inheritedIndentation = processChildNode(child, inheritedIndentation, node, listDynamicIndentation, startLine, startLine, /*isListItem*/ true, /*isFirstListItem*/ i === 0);
|
|
143099
143180
|
}
|
|
143100
143181
|
var listEndToken = getCloseTokenForOpenToken(listStartToken);
|
|
143101
|
-
if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken()) {
|
|
143182
|
+
if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) {
|
|
143102
143183
|
var tokenInfo = formattingScanner.readTokenInfo(parent);
|
|
143103
143184
|
if (tokenInfo.token.kind === 27 /* CommaToken */ && ts.isCallLikeExpression(parent)) {
|
|
143104
143185
|
var commaTokenLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line;
|
|
@@ -143229,24 +143310,26 @@ var ts;
|
|
|
143229
143310
|
// win in a conflict with lower priority rules.
|
|
143230
143311
|
ts.forEachRight(rules, function (rule) {
|
|
143231
143312
|
lineAction = applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine);
|
|
143232
|
-
|
|
143233
|
-
|
|
143234
|
-
|
|
143235
|
-
|
|
143236
|
-
|
|
143237
|
-
|
|
143238
|
-
|
|
143239
|
-
|
|
143240
|
-
|
|
143241
|
-
|
|
143242
|
-
|
|
143243
|
-
|
|
143244
|
-
|
|
143245
|
-
|
|
143246
|
-
|
|
143247
|
-
|
|
143248
|
-
|
|
143249
|
-
|
|
143313
|
+
if (dynamicIndentation) {
|
|
143314
|
+
switch (lineAction) {
|
|
143315
|
+
case 2 /* LineRemoved */:
|
|
143316
|
+
// Handle the case where the next line is moved to be the end of this line.
|
|
143317
|
+
// In this case we don't indent the next line in the next pass.
|
|
143318
|
+
if (currentParent.getStart(sourceFile) === currentItem.pos) {
|
|
143319
|
+
dynamicIndentation.recomputeIndentation(/*lineAddedByFormatting*/ false, contextNode);
|
|
143320
|
+
}
|
|
143321
|
+
break;
|
|
143322
|
+
case 1 /* LineAdded */:
|
|
143323
|
+
// Handle the case where token2 is moved to the new line.
|
|
143324
|
+
// In this case we indent token2 in the next pass but we set
|
|
143325
|
+
// sameLineIndent flag to notify the indenter that the indentation is within the line.
|
|
143326
|
+
if (currentParent.getStart(sourceFile) === currentItem.pos) {
|
|
143327
|
+
dynamicIndentation.recomputeIndentation(/*lineAddedByFormatting*/ true, contextNode);
|
|
143328
|
+
}
|
|
143329
|
+
break;
|
|
143330
|
+
default:
|
|
143331
|
+
ts.Debug.assert(lineAction === 0 /* None */);
|
|
143332
|
+
}
|
|
143250
143333
|
}
|
|
143251
143334
|
// We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line
|
|
143252
143335
|
trimTrailingWhitespaces = trimTrailingWhitespaces && !(rule.action & 16 /* DeleteSpace */) && rule.flags !== 1 /* CanDeleteNewLines */;
|
|
@@ -145724,7 +145807,7 @@ var ts;
|
|
|
145724
145807
|
var errorCodes = [ts.Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];
|
|
145725
145808
|
codefix.registerCodeFix({
|
|
145726
145809
|
errorCodes: errorCodes,
|
|
145727
|
-
getCodeActions: function (context) {
|
|
145810
|
+
getCodeActions: function getCodeActionsToAddConvertToUnknownForNonOverlappingTypes(context) {
|
|
145728
145811
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
|
|
145729
145812
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_unknown_conversion_for_non_overlapping_types, fixId, ts.Diagnostics.Add_unknown_to_all_conversions_of_non_overlapping_types)];
|
|
145730
145813
|
},
|
|
@@ -145751,7 +145834,7 @@ var ts;
|
|
|
145751
145834
|
ts.Diagnostics.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,
|
|
145752
145835
|
ts.Diagnostics.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module.code,
|
|
145753
145836
|
],
|
|
145754
|
-
getCodeActions: function (context) {
|
|
145837
|
+
getCodeActions: function getCodeActionsToAddEmptyExportDeclaration(context) {
|
|
145755
145838
|
var sourceFile = context.sourceFile;
|
|
145756
145839
|
var changes = ts.textChanges.ChangeTracker.with(context, function (changes) {
|
|
145757
145840
|
var exportDeclaration = ts.factory.createExportDeclaration(
|
|
@@ -145780,7 +145863,7 @@ var ts;
|
|
|
145780
145863
|
codefix.registerCodeFix({
|
|
145781
145864
|
fixIds: [fixId],
|
|
145782
145865
|
errorCodes: errorCodes,
|
|
145783
|
-
getCodeActions: function (context) {
|
|
145866
|
+
getCodeActions: function getCodeActionsToAddMissingAsync(context) {
|
|
145784
145867
|
var sourceFile = context.sourceFile, errorCode = context.errorCode, cancellationToken = context.cancellationToken, program = context.program, span = context.span;
|
|
145785
145868
|
var diagnostic = ts.find(program.getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile, cancellationToken), getIsMatchingAsyncError(span, errorCode));
|
|
145786
145869
|
var directSpan = diagnostic && diagnostic.relatedInformation && ts.find(diagnostic.relatedInformation, function (r) { return r.code === ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async.code; });
|
|
@@ -145877,7 +145960,7 @@ var ts;
|
|
|
145877
145960
|
codefix.registerCodeFix({
|
|
145878
145961
|
fixIds: [fixId],
|
|
145879
145962
|
errorCodes: errorCodes,
|
|
145880
|
-
getCodeActions: function (context) {
|
|
145963
|
+
getCodeActions: function getCodeActionsToAddMissingAwait(context) {
|
|
145881
145964
|
var sourceFile = context.sourceFile, errorCode = context.errorCode, span = context.span, cancellationToken = context.cancellationToken, program = context.program;
|
|
145882
145965
|
var expression = getAwaitErrorSpanExpression(sourceFile, errorCode, span, cancellationToken, program);
|
|
145883
145966
|
if (!expression) {
|
|
@@ -146109,7 +146192,7 @@ var ts;
|
|
|
146109
146192
|
];
|
|
146110
146193
|
codefix.registerCodeFix({
|
|
146111
146194
|
errorCodes: errorCodes,
|
|
146112
|
-
getCodeActions: function (context) {
|
|
146195
|
+
getCodeActions: function getCodeActionsToAddMissingConst(context) {
|
|
146113
146196
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start, context.program); });
|
|
146114
146197
|
if (changes.length > 0) {
|
|
146115
146198
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_const_to_unresolved_variable, fixId, ts.Diagnostics.Add_const_to_all_unresolved_variables)];
|
|
@@ -146209,7 +146292,7 @@ var ts;
|
|
|
146209
146292
|
];
|
|
146210
146293
|
codefix.registerCodeFix({
|
|
146211
146294
|
errorCodes: errorCodes,
|
|
146212
|
-
getCodeActions: function (context) {
|
|
146295
|
+
getCodeActions: function getCodeActionsToAddMissingDeclareOnProperty(context) {
|
|
146213
146296
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
|
|
146214
146297
|
if (changes.length > 0) {
|
|
146215
146298
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Prefix_with_declare, fixId, ts.Diagnostics.Prefix_all_incorrect_property_declarations_with_declare)];
|
|
@@ -146243,7 +146326,7 @@ var ts;
|
|
|
146243
146326
|
var errorCodes = [ts.Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];
|
|
146244
146327
|
codefix.registerCodeFix({
|
|
146245
146328
|
errorCodes: errorCodes,
|
|
146246
|
-
getCodeActions: function (context) {
|
|
146329
|
+
getCodeActions: function getCodeActionsToAddMissingInvocationForDecorator(context) {
|
|
146247
146330
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
|
|
146248
146331
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Call_decorator_expression, fixId, ts.Diagnostics.Add_to_all_uncalled_decorators)];
|
|
146249
146332
|
},
|
|
@@ -146268,7 +146351,7 @@ var ts;
|
|
|
146268
146351
|
var errorCodes = [ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];
|
|
146269
146352
|
codefix.registerCodeFix({
|
|
146270
146353
|
errorCodes: errorCodes,
|
|
146271
|
-
getCodeActions: function (context) {
|
|
146354
|
+
getCodeActions: function getCodeActionsToAddNameToNamelessParameter(context) {
|
|
146272
146355
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
|
|
146273
146356
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_parameter_name, fixId, ts.Diagnostics.Add_names_to_all_parameters_without_names)];
|
|
146274
146357
|
},
|
|
@@ -148070,14 +148153,14 @@ var ts;
|
|
|
148070
148153
|
var fixId = "convertToTypeOnlyExport";
|
|
148071
148154
|
codefix.registerCodeFix({
|
|
148072
148155
|
errorCodes: errorCodes,
|
|
148073
|
-
getCodeActions: function (context) {
|
|
148156
|
+
getCodeActions: function getCodeActionsToConvertToTypeOnlyExport(context) {
|
|
148074
148157
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return fixSingleExportDeclaration(t, getExportSpecifierForDiagnosticSpan(context.span, context.sourceFile), context); });
|
|
148075
148158
|
if (changes.length) {
|
|
148076
148159
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Convert_to_type_only_export, fixId, ts.Diagnostics.Convert_all_re_exported_types_to_type_only_exports)];
|
|
148077
148160
|
}
|
|
148078
148161
|
},
|
|
148079
148162
|
fixIds: [fixId],
|
|
148080
|
-
getAllCodeActions: function (context) {
|
|
148163
|
+
getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyExport(context) {
|
|
148081
148164
|
var fixedExportDeclarations = new ts.Map();
|
|
148082
148165
|
return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
|
|
148083
148166
|
var exportSpecifier = getExportSpecifierForDiagnosticSpan(diag, context.sourceFile);
|
|
@@ -148138,7 +148221,7 @@ var ts;
|
|
|
148138
148221
|
var fixId = "convertToTypeOnlyImport";
|
|
148139
148222
|
codefix.registerCodeFix({
|
|
148140
148223
|
errorCodes: errorCodes,
|
|
148141
|
-
getCodeActions: function (context) {
|
|
148224
|
+
getCodeActions: function getCodeActionsToConvertToTypeOnlyImport(context) {
|
|
148142
148225
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) {
|
|
148143
148226
|
var importDeclaration = getImportDeclarationForDiagnosticSpan(context.span, context.sourceFile);
|
|
148144
148227
|
fixSingleImportDeclaration(t, importDeclaration, context);
|
|
@@ -148148,7 +148231,7 @@ var ts;
|
|
|
148148
148231
|
}
|
|
148149
148232
|
},
|
|
148150
148233
|
fixIds: [fixId],
|
|
148151
|
-
getAllCodeActions: function (context) {
|
|
148234
|
+
getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyImport(context) {
|
|
148152
148235
|
return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
|
|
148153
148236
|
var importDeclaration = getImportDeclarationForDiagnosticSpan(diag, context.sourceFile);
|
|
148154
148237
|
fixSingleImportDeclaration(changes, importDeclaration, context);
|
|
@@ -148187,7 +148270,7 @@ var ts;
|
|
|
148187
148270
|
var errorCodes = [ts.Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code];
|
|
148188
148271
|
codefix.registerCodeFix({
|
|
148189
148272
|
errorCodes: errorCodes,
|
|
148190
|
-
getCodeActions: function (context) {
|
|
148273
|
+
getCodeActions: function getCodeActionsToConvertLiteralTypeToMappedType(context) {
|
|
148191
148274
|
var sourceFile = context.sourceFile, span = context.span;
|
|
148192
148275
|
var info = getInfo(sourceFile, span.start);
|
|
148193
148276
|
if (!info) {
|
|
@@ -149331,7 +149414,7 @@ var ts;
|
|
|
149331
149414
|
_a);
|
|
149332
149415
|
codefix.registerCodeFix({
|
|
149333
149416
|
errorCodes: errorCodes,
|
|
149334
|
-
getCodeActions: function (context) {
|
|
149417
|
+
getCodeActions: function getCodeActionsToFixOverrideModifierIssues(context) {
|
|
149335
149418
|
var errorCode = context.errorCode, span = context.span;
|
|
149336
149419
|
var info = errorCodeFixIdMap[errorCode];
|
|
149337
149420
|
if (!info)
|
|
@@ -149527,7 +149610,7 @@ var ts;
|
|
|
149527
149610
|
];
|
|
149528
149611
|
codefix.registerCodeFix({
|
|
149529
149612
|
errorCodes: errorCodes,
|
|
149530
|
-
getCodeActions: function (context) {
|
|
149613
|
+
getCodeActions: function getCodeActionsToFixIncorrectNamedTupleSyntax(context) {
|
|
149531
149614
|
var sourceFile = context.sourceFile, span = context.span;
|
|
149532
149615
|
var namedTupleMember = getNamedTupleMember(sourceFile, span.start);
|
|
149533
149616
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, namedTupleMember); });
|
|
@@ -149726,7 +149809,7 @@ var ts;
|
|
|
149726
149809
|
codefix.registerCodeFix({
|
|
149727
149810
|
errorCodes: errorCodes,
|
|
149728
149811
|
fixIds: [fixIdAddReturnStatement, fixRemoveBracesFromArrowFunctionBody, fixIdWrapTheBlockWithParen],
|
|
149729
|
-
getCodeActions: function (context) {
|
|
149812
|
+
getCodeActions: function getCodeActionsToCorrectReturnValue(context) {
|
|
149730
149813
|
var program = context.program, sourceFile = context.sourceFile, start = context.span.start, errorCode = context.errorCode;
|
|
149731
149814
|
var info = getInfo(program.getTypeChecker(), sourceFile, start, errorCode);
|
|
149732
149815
|
if (!info)
|
|
@@ -150476,7 +150559,7 @@ var ts;
|
|
|
150476
150559
|
];
|
|
150477
150560
|
codefix.registerCodeFix({
|
|
150478
150561
|
errorCodes: errorCodes,
|
|
150479
|
-
getCodeActions: function (context) {
|
|
150562
|
+
getCodeActions: function getCodeActionsToFixNotFoundModule(context) {
|
|
150480
150563
|
var host = context.host, sourceFile = context.sourceFile, start = context.span.start;
|
|
150481
150564
|
var packageName = tryGetImportedPackageName(sourceFile, start);
|
|
150482
150565
|
if (packageName === undefined)
|
|
@@ -150537,7 +150620,7 @@ var ts;
|
|
|
150537
150620
|
var fixId = "fixClassDoesntImplementInheritedAbstractMember";
|
|
150538
150621
|
codefix.registerCodeFix({
|
|
150539
150622
|
errorCodes: errorCodes,
|
|
150540
|
-
getCodeActions: function (context) {
|
|
150623
|
+
getCodeActions: function getCodeActionsToFixClassNotImplementingInheritedMembers(context) {
|
|
150541
150624
|
var sourceFile = context.sourceFile, span = context.span;
|
|
150542
150625
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) {
|
|
150543
150626
|
return addMissingMembers(getClass(sourceFile, span.start), sourceFile, context, t, context.preferences);
|
|
@@ -150545,7 +150628,7 @@ var ts;
|
|
|
150545
150628
|
return changes.length === 0 ? undefined : [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Implement_inherited_abstract_class, fixId, ts.Diagnostics.Implement_all_inherited_abstract_classes)];
|
|
150546
150629
|
},
|
|
150547
150630
|
fixIds: [fixId],
|
|
150548
|
-
getAllCodeActions: function (context) {
|
|
150631
|
+
getAllCodeActions: function getAllCodeActionsToFixClassDoesntImplementInheritedAbstractMember(context) {
|
|
150549
150632
|
var seenClassDeclarations = new ts.Map();
|
|
150550
150633
|
return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
|
|
150551
150634
|
var classDeclaration = getClass(diag.file, diag.start);
|
|
@@ -150678,7 +150761,7 @@ var ts;
|
|
|
150678
150761
|
];
|
|
150679
150762
|
codefix.registerCodeFix({
|
|
150680
150763
|
errorCodes: errorCodes,
|
|
150681
|
-
getCodeActions: function (context) {
|
|
150764
|
+
getCodeActions: function getCodeActionsToEnableExperimentalDecorators(context) {
|
|
150682
150765
|
var configFile = context.program.getCompilerOptions().configFile;
|
|
150683
150766
|
if (configFile === undefined) {
|
|
150684
150767
|
return undefined;
|
|
@@ -150709,7 +150792,7 @@ var ts;
|
|
|
150709
150792
|
var errorCodes = [ts.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];
|
|
150710
150793
|
codefix.registerCodeFix({
|
|
150711
150794
|
errorCodes: errorCodes,
|
|
150712
|
-
getCodeActions: function (context) {
|
|
150795
|
+
getCodeActions: function getCodeActionsToFixEnableJsxFlag(context) {
|
|
150713
150796
|
var configFile = context.program.getCompilerOptions().configFile;
|
|
150714
150797
|
if (configFile === undefined) {
|
|
150715
150798
|
return undefined;
|
|
@@ -150747,7 +150830,7 @@ var ts;
|
|
|
150747
150830
|
ts.Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code,
|
|
150748
150831
|
ts.Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher.code,
|
|
150749
150832
|
],
|
|
150750
|
-
getCodeActions: function (context) {
|
|
150833
|
+
getCodeActions: function getCodeActionsToFixModuleAndTarget(context) {
|
|
150751
150834
|
var compilerOptions = context.program.getCompilerOptions();
|
|
150752
150835
|
var configFile = compilerOptions.configFile;
|
|
150753
150836
|
if (configFile === undefined) {
|
|
@@ -151519,7 +151602,7 @@ var ts;
|
|
|
151519
151602
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_async_modifier_to_containing_function, fixId, ts.Diagnostics.Add_all_missing_async_modifiers)];
|
|
151520
151603
|
},
|
|
151521
151604
|
fixIds: [fixId],
|
|
151522
|
-
getAllCodeActions: function (context) {
|
|
151605
|
+
getAllCodeActions: function getAllCodeActionsToFixAwaitInSyncFunction(context) {
|
|
151523
151606
|
var seen = new ts.Map();
|
|
151524
151607
|
return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
|
|
151525
151608
|
var nodes = getNodes(diag.file, diag.start);
|
|
@@ -152641,7 +152724,7 @@ var ts;
|
|
|
152641
152724
|
codefix.registerCodeFix({
|
|
152642
152725
|
errorCodes: errorCodes,
|
|
152643
152726
|
fixIds: [fixId],
|
|
152644
|
-
getCodeActions: function (context) {
|
|
152727
|
+
getCodeActions: function getCodeActionsToFixReturnTypeInAsyncFunction(context) {
|
|
152645
152728
|
var sourceFile = context.sourceFile, program = context.program, span = context.span;
|
|
152646
152729
|
var checker = program.getTypeChecker();
|
|
152647
152730
|
var info = getInfo(sourceFile, program.getTypeChecker(), span.start);
|
|
@@ -152695,7 +152778,7 @@ var ts;
|
|
|
152695
152778
|
});
|
|
152696
152779
|
codefix.registerCodeFix({
|
|
152697
152780
|
errorCodes: errorCodes,
|
|
152698
|
-
getCodeActions: function (context) {
|
|
152781
|
+
getCodeActions: function getCodeActionsToDisableJsDiagnostics(context) {
|
|
152699
152782
|
var sourceFile = context.sourceFile, program = context.program, span = context.span, host = context.host, formatContext = context.formatContext;
|
|
152700
152783
|
if (!ts.isInJSFile(sourceFile) || !ts.isCheckJsEnabledForFile(sourceFile, program.getCompilerOptions())) {
|
|
152701
152784
|
return undefined;
|
|
@@ -153464,7 +153547,7 @@ var ts;
|
|
|
153464
153547
|
var errorCodes = [ts.Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];
|
|
153465
153548
|
codefix.registerCodeFix({
|
|
153466
153549
|
errorCodes: errorCodes,
|
|
153467
|
-
getCodeActions: function (context) {
|
|
153550
|
+
getCodeActions: function getCodeActionsForStrictClassInitializationErrors(context) {
|
|
153468
153551
|
var propertyDeclaration = getPropertyDeclaration(context.sourceFile, context.span.start);
|
|
153469
153552
|
if (!propertyDeclaration)
|
|
153470
153553
|
return;
|
|
@@ -153687,7 +153770,7 @@ var ts;
|
|
|
153687
153770
|
];
|
|
153688
153771
|
codefix.registerCodeFix({
|
|
153689
153772
|
errorCodes: errorCodes,
|
|
153690
|
-
getCodeActions: function (context) {
|
|
153773
|
+
getCodeActions: function getCodeActionsToUseBigintLiteral(context) {
|
|
153691
153774
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span); });
|
|
153692
153775
|
if (changes.length > 0) {
|
|
153693
153776
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Convert_to_a_bigint_numeric_literal, fixId, ts.Diagnostics.Convert_all_to_bigint_numeric_literals)];
|
|
@@ -153719,7 +153802,7 @@ var ts;
|
|
|
153719
153802
|
var errorCodes = [ts.Diagnostics.Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0.code];
|
|
153720
153803
|
codefix.registerCodeFix({
|
|
153721
153804
|
errorCodes: errorCodes,
|
|
153722
|
-
getCodeActions: function (context) {
|
|
153805
|
+
getCodeActions: function getCodeActionsToAddMissingTypeof(context) {
|
|
153723
153806
|
var sourceFile = context.sourceFile, span = context.span;
|
|
153724
153807
|
var importType = getImportTypeNode(sourceFile, span.start);
|
|
153725
153808
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, importType); });
|
|
@@ -153751,7 +153834,7 @@ var ts;
|
|
|
153751
153834
|
var errorCodes = [ts.Diagnostics.JSX_expressions_must_have_one_parent_element.code];
|
|
153752
153835
|
codefix.registerCodeFix({
|
|
153753
153836
|
errorCodes: errorCodes,
|
|
153754
|
-
getCodeActions: function (context) {
|
|
153837
|
+
getCodeActions: function getCodeActionsToWrapJsxInFragment(context) {
|
|
153755
153838
|
var sourceFile = context.sourceFile, span = context.span;
|
|
153756
153839
|
var node = findNodeToFix(sourceFile, span.start);
|
|
153757
153840
|
if (!node)
|
|
@@ -153823,12 +153906,11 @@ var ts;
|
|
|
153823
153906
|
(function (ts) {
|
|
153824
153907
|
var codefix;
|
|
153825
153908
|
(function (codefix) {
|
|
153826
|
-
var
|
|
153827
|
-
var fixId = fixIdAddMissingTypeof;
|
|
153909
|
+
var fixId = "fixConvertToMappedObjectType";
|
|
153828
153910
|
var errorCodes = [ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];
|
|
153829
153911
|
codefix.registerCodeFix({
|
|
153830
153912
|
errorCodes: errorCodes,
|
|
153831
|
-
getCodeActions: function (context) {
|
|
153913
|
+
getCodeActions: function getCodeActionsToConvertToMappedTypeObject(context) {
|
|
153832
153914
|
var sourceFile = context.sourceFile, span = context.span;
|
|
153833
153915
|
var info = getInfo(sourceFile, span.start);
|
|
153834
153916
|
if (!info)
|
|
@@ -153907,7 +153989,7 @@ var ts;
|
|
|
153907
153989
|
];
|
|
153908
153990
|
codefix.registerCodeFix({
|
|
153909
153991
|
errorCodes: errorCodes,
|
|
153910
|
-
getCodeActions: function (context) {
|
|
153992
|
+
getCodeActions: function getCodeActionsToRemoveUnnecessaryAwait(context) {
|
|
153911
153993
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span); });
|
|
153912
153994
|
if (changes.length > 0) {
|
|
153913
153995
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Remove_unnecessary_await, fixId, ts.Diagnostics.Remove_all_unnecessary_uses_of_await)];
|
|
@@ -153949,7 +154031,7 @@ var ts;
|
|
|
153949
154031
|
codefix.registerCodeFix({
|
|
153950
154032
|
errorCodes: errorCodes,
|
|
153951
154033
|
fixIds: [fixId],
|
|
153952
|
-
getCodeActions: function (context) {
|
|
154034
|
+
getCodeActions: function getCodeActionsToSplitTypeOnlyImport(context) {
|
|
153953
154035
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) {
|
|
153954
154036
|
return splitTypeOnlyImport(t, getImportDeclaration(context.sourceFile, context.span), context);
|
|
153955
154037
|
});
|
|
@@ -153985,7 +154067,7 @@ var ts;
|
|
|
153985
154067
|
var errorCodes = [ts.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];
|
|
153986
154068
|
codefix.registerCodeFix({
|
|
153987
154069
|
errorCodes: errorCodes,
|
|
153988
|
-
getCodeActions: function (context) {
|
|
154070
|
+
getCodeActions: function getCodeActionsToConvertConstToLet(context) {
|
|
153989
154071
|
var sourceFile = context.sourceFile, span = context.span, program = context.program;
|
|
153990
154072
|
var range = getConstTokenRange(sourceFile, span.start, program);
|
|
153991
154073
|
if (range === undefined)
|