typescript 4.6.0-dev.20211125 → 4.6.0-dev.20211202
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 +178 -103
- package/lib/tsserver.js +254 -176
- package/lib/tsserverlibrary.js +254 -176
- package/lib/typescript.js +254 -176
- package/lib/typescriptServices.js +254 -176
- package/lib/typingsInstaller.js +162 -103
- package/package.json +1 -1
|
@@ -294,7 +294,7 @@ var ts;
|
|
|
294
294
|
// The following is baselined as a literal template type without intervention
|
|
295
295
|
/** The version of the TypeScript compiler release */
|
|
296
296
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
297
|
-
ts.version = ts.versionMajorMinor + ".0-dev.
|
|
297
|
+
ts.version = ts.versionMajorMinor + ".0-dev.20211202";
|
|
298
298
|
/* @internal */
|
|
299
299
|
var Comparison;
|
|
300
300
|
(function (Comparison) {
|
|
@@ -33802,9 +33802,10 @@ var ts;
|
|
|
33802
33802
|
// - "(x,y)" is a comma expression parsed as a signature with two parameters.
|
|
33803
33803
|
// - "a ? (b): c" will have "(b):" parsed as a signature with a return type annotation.
|
|
33804
33804
|
// - "a ? (b): function() {}" will too, since function() is a valid JSDoc function type.
|
|
33805
|
+
// - "a ? (b): (function() {})" as well, but inside of a parenthesized type.
|
|
33805
33806
|
//
|
|
33806
33807
|
// So we need just a bit of lookahead to ensure that it can only be a signature.
|
|
33807
|
-
var hasJSDocFunctionType = type && ts.isJSDocFunctionType(type);
|
|
33808
|
+
var hasJSDocFunctionType = type && (ts.isJSDocFunctionType(type) || ts.isParenthesizedTypeNode(type) && ts.isJSDocFunctionType(type.type));
|
|
33808
33809
|
if (!allowAmbiguity && token() !== 38 /* EqualsGreaterThanToken */ && (hasJSDocFunctionType || token() !== 18 /* OpenBraceToken */)) {
|
|
33809
33810
|
// Returning undefined here will cause our caller to rewind to where we started from.
|
|
33810
33811
|
return undefined;
|
|
@@ -38203,7 +38204,11 @@ var ts;
|
|
|
38203
38204
|
var ts;
|
|
38204
38205
|
(function (ts) {
|
|
38205
38206
|
/* @internal */
|
|
38206
|
-
ts.compileOnSaveCommandLineOption = {
|
|
38207
|
+
ts.compileOnSaveCommandLineOption = {
|
|
38208
|
+
name: "compileOnSave",
|
|
38209
|
+
type: "boolean",
|
|
38210
|
+
defaultValueDescription: false,
|
|
38211
|
+
};
|
|
38207
38212
|
var jsxOptionMap = new ts.Map(ts.getEntries({
|
|
38208
38213
|
"preserve": 1 /* Preserve */,
|
|
38209
38214
|
"react-native": 3 /* ReactNative */,
|
|
@@ -38317,6 +38322,7 @@ var ts;
|
|
|
38317
38322
|
})),
|
|
38318
38323
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38319
38324
|
description: ts.Diagnostics.Specify_how_the_TypeScript_watch_mode_works,
|
|
38325
|
+
defaultValueDescription: ts.WatchFileKind.UseFsEvents,
|
|
38320
38326
|
},
|
|
38321
38327
|
{
|
|
38322
38328
|
name: "watchDirectory",
|
|
@@ -38328,6 +38334,7 @@ var ts;
|
|
|
38328
38334
|
})),
|
|
38329
38335
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38330
38336
|
description: ts.Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,
|
|
38337
|
+
defaultValueDescription: ts.WatchDirectoryKind.UseFsEvents,
|
|
38331
38338
|
},
|
|
38332
38339
|
{
|
|
38333
38340
|
name: "fallbackPolling",
|
|
@@ -38339,13 +38346,14 @@ var ts;
|
|
|
38339
38346
|
})),
|
|
38340
38347
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38341
38348
|
description: ts.Diagnostics.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,
|
|
38349
|
+
defaultValueDescription: ts.PollingWatchKind.PriorityInterval,
|
|
38342
38350
|
},
|
|
38343
38351
|
{
|
|
38344
38352
|
name: "synchronousWatchDirectory",
|
|
38345
38353
|
type: "boolean",
|
|
38346
38354
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38347
38355
|
description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
|
|
38348
|
-
defaultValueDescription:
|
|
38356
|
+
defaultValueDescription: false,
|
|
38349
38357
|
},
|
|
38350
38358
|
{
|
|
38351
38359
|
name: "excludeDirectories",
|
|
@@ -38381,13 +38389,13 @@ var ts;
|
|
|
38381
38389
|
showInSimplifiedHelpView: true,
|
|
38382
38390
|
category: ts.Diagnostics.Command_line_Options,
|
|
38383
38391
|
description: ts.Diagnostics.Print_this_message,
|
|
38384
|
-
defaultValueDescription:
|
|
38392
|
+
defaultValueDescription: false,
|
|
38385
38393
|
},
|
|
38386
38394
|
{
|
|
38387
38395
|
name: "help",
|
|
38388
38396
|
shortName: "?",
|
|
38389
38397
|
type: "boolean",
|
|
38390
|
-
defaultValueDescription:
|
|
38398
|
+
defaultValueDescription: false,
|
|
38391
38399
|
},
|
|
38392
38400
|
{
|
|
38393
38401
|
name: "watch",
|
|
@@ -38397,7 +38405,7 @@ var ts;
|
|
|
38397
38405
|
isCommandLineOnly: true,
|
|
38398
38406
|
category: ts.Diagnostics.Command_line_Options,
|
|
38399
38407
|
description: ts.Diagnostics.Watch_input_files,
|
|
38400
|
-
defaultValueDescription:
|
|
38408
|
+
defaultValueDescription: false,
|
|
38401
38409
|
},
|
|
38402
38410
|
{
|
|
38403
38411
|
name: "preserveWatchOutput",
|
|
@@ -38405,28 +38413,28 @@ var ts;
|
|
|
38405
38413
|
showInSimplifiedHelpView: false,
|
|
38406
38414
|
category: ts.Diagnostics.Output_Formatting,
|
|
38407
38415
|
description: ts.Diagnostics.Disable_wiping_the_console_in_watch_mode,
|
|
38408
|
-
defaultValueDescription:
|
|
38416
|
+
defaultValueDescription: false,
|
|
38409
38417
|
},
|
|
38410
38418
|
{
|
|
38411
38419
|
name: "listFiles",
|
|
38412
38420
|
type: "boolean",
|
|
38413
38421
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38414
38422
|
description: ts.Diagnostics.Print_all_of_the_files_read_during_the_compilation,
|
|
38415
|
-
defaultValueDescription:
|
|
38423
|
+
defaultValueDescription: false,
|
|
38416
38424
|
},
|
|
38417
38425
|
{
|
|
38418
38426
|
name: "explainFiles",
|
|
38419
38427
|
type: "boolean",
|
|
38420
38428
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38421
38429
|
description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,
|
|
38422
|
-
defaultValueDescription:
|
|
38430
|
+
defaultValueDescription: false,
|
|
38423
38431
|
},
|
|
38424
38432
|
{
|
|
38425
38433
|
name: "listEmittedFiles",
|
|
38426
38434
|
type: "boolean",
|
|
38427
38435
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38428
38436
|
description: ts.Diagnostics.Print_the_names_of_emitted_files_after_a_compilation,
|
|
38429
|
-
defaultValueDescription:
|
|
38437
|
+
defaultValueDescription: false,
|
|
38430
38438
|
},
|
|
38431
38439
|
{
|
|
38432
38440
|
name: "pretty",
|
|
@@ -38434,28 +38442,28 @@ var ts;
|
|
|
38434
38442
|
showInSimplifiedHelpView: true,
|
|
38435
38443
|
category: ts.Diagnostics.Output_Formatting,
|
|
38436
38444
|
description: ts.Diagnostics.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,
|
|
38437
|
-
defaultValueDescription:
|
|
38445
|
+
defaultValueDescription: true,
|
|
38438
38446
|
},
|
|
38439
38447
|
{
|
|
38440
38448
|
name: "traceResolution",
|
|
38441
38449
|
type: "boolean",
|
|
38442
38450
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38443
38451
|
description: ts.Diagnostics.Log_paths_used_during_the_moduleResolution_process,
|
|
38444
|
-
defaultValueDescription:
|
|
38452
|
+
defaultValueDescription: false,
|
|
38445
38453
|
},
|
|
38446
38454
|
{
|
|
38447
38455
|
name: "diagnostics",
|
|
38448
38456
|
type: "boolean",
|
|
38449
38457
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38450
38458
|
description: ts.Diagnostics.Output_compiler_performance_information_after_building,
|
|
38451
|
-
defaultValueDescription:
|
|
38459
|
+
defaultValueDescription: false,
|
|
38452
38460
|
},
|
|
38453
38461
|
{
|
|
38454
38462
|
name: "extendedDiagnostics",
|
|
38455
38463
|
type: "boolean",
|
|
38456
38464
|
category: ts.Diagnostics.Compiler_Diagnostics,
|
|
38457
38465
|
description: ts.Diagnostics.Output_more_detailed_compiler_performance_information_after_building,
|
|
38458
|
-
defaultValueDescription:
|
|
38466
|
+
defaultValueDescription: false,
|
|
38459
38467
|
},
|
|
38460
38468
|
{
|
|
38461
38469
|
name: "generateCpuProfile",
|
|
@@ -38491,7 +38499,7 @@ var ts;
|
|
|
38491
38499
|
affectsEmit: true,
|
|
38492
38500
|
category: ts.Diagnostics.Watch_and_Build_Modes,
|
|
38493
38501
|
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,
|
|
38494
|
-
defaultValueDescription:
|
|
38502
|
+
defaultValueDescription: false,
|
|
38495
38503
|
},
|
|
38496
38504
|
{
|
|
38497
38505
|
name: "locale",
|
|
@@ -38527,7 +38535,7 @@ var ts;
|
|
|
38527
38535
|
showInSimplifiedHelpView: true,
|
|
38528
38536
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38529
38537
|
description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
|
|
38530
|
-
defaultValueDescription:
|
|
38538
|
+
defaultValueDescription: 0 /* ES3 */,
|
|
38531
38539
|
};
|
|
38532
38540
|
var commandOptionsWithoutBuild = [
|
|
38533
38541
|
// CommandLine only options
|
|
@@ -38537,7 +38545,7 @@ var ts;
|
|
|
38537
38545
|
showInSimplifiedHelpView: true,
|
|
38538
38546
|
category: ts.Diagnostics.Command_line_Options,
|
|
38539
38547
|
description: ts.Diagnostics.Show_all_compiler_options,
|
|
38540
|
-
defaultValueDescription:
|
|
38548
|
+
defaultValueDescription: false,
|
|
38541
38549
|
},
|
|
38542
38550
|
{
|
|
38543
38551
|
name: "version",
|
|
@@ -38546,7 +38554,7 @@ var ts;
|
|
|
38546
38554
|
showInSimplifiedHelpView: true,
|
|
38547
38555
|
category: ts.Diagnostics.Command_line_Options,
|
|
38548
38556
|
description: ts.Diagnostics.Print_the_compiler_s_version,
|
|
38549
|
-
defaultValueDescription:
|
|
38557
|
+
defaultValueDescription: false,
|
|
38550
38558
|
},
|
|
38551
38559
|
{
|
|
38552
38560
|
name: "init",
|
|
@@ -38554,7 +38562,7 @@ var ts;
|
|
|
38554
38562
|
showInSimplifiedHelpView: true,
|
|
38555
38563
|
category: ts.Diagnostics.Command_line_Options,
|
|
38556
38564
|
description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
|
|
38557
|
-
defaultValueDescription:
|
|
38565
|
+
defaultValueDescription: false,
|
|
38558
38566
|
},
|
|
38559
38567
|
{
|
|
38560
38568
|
name: "project",
|
|
@@ -38573,7 +38581,7 @@ var ts;
|
|
|
38573
38581
|
showInSimplifiedHelpView: true,
|
|
38574
38582
|
category: ts.Diagnostics.Command_line_Options,
|
|
38575
38583
|
description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,
|
|
38576
|
-
defaultValueDescription:
|
|
38584
|
+
defaultValueDescription: false,
|
|
38577
38585
|
},
|
|
38578
38586
|
{
|
|
38579
38587
|
name: "showConfig",
|
|
@@ -38582,7 +38590,7 @@ var ts;
|
|
|
38582
38590
|
category: ts.Diagnostics.Command_line_Options,
|
|
38583
38591
|
isCommandLineOnly: true,
|
|
38584
38592
|
description: ts.Diagnostics.Print_the_final_configuration_instead_of_building,
|
|
38585
|
-
defaultValueDescription:
|
|
38593
|
+
defaultValueDescription: false,
|
|
38586
38594
|
},
|
|
38587
38595
|
{
|
|
38588
38596
|
name: "listFilesOnly",
|
|
@@ -38592,7 +38600,7 @@ var ts;
|
|
|
38592
38600
|
affectsEmit: true,
|
|
38593
38601
|
isCommandLineOnly: true,
|
|
38594
38602
|
description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
|
|
38595
|
-
defaultValueDescription:
|
|
38603
|
+
defaultValueDescription: false,
|
|
38596
38604
|
},
|
|
38597
38605
|
// Basic
|
|
38598
38606
|
ts.targetOptionDeclaration,
|
|
@@ -38619,13 +38627,15 @@ var ts;
|
|
|
38619
38627
|
showInSimplifiedHelpView: true,
|
|
38620
38628
|
category: ts.Diagnostics.Modules,
|
|
38621
38629
|
description: ts.Diagnostics.Specify_what_module_code_is_generated,
|
|
38630
|
+
defaultValueDescription: undefined,
|
|
38622
38631
|
},
|
|
38623
38632
|
{
|
|
38624
38633
|
name: "lib",
|
|
38625
38634
|
type: "list",
|
|
38626
38635
|
element: {
|
|
38627
38636
|
name: "lib",
|
|
38628
|
-
type: ts.libMap
|
|
38637
|
+
type: ts.libMap,
|
|
38638
|
+
defaultValueDescription: undefined,
|
|
38629
38639
|
},
|
|
38630
38640
|
affectsProgramStructure: true,
|
|
38631
38641
|
showInSimplifiedHelpView: true,
|
|
@@ -38640,7 +38650,7 @@ var ts;
|
|
|
38640
38650
|
showInSimplifiedHelpView: true,
|
|
38641
38651
|
category: ts.Diagnostics.JavaScript_Support,
|
|
38642
38652
|
description: ts.Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
|
|
38643
|
-
defaultValueDescription:
|
|
38653
|
+
defaultValueDescription: false,
|
|
38644
38654
|
},
|
|
38645
38655
|
{
|
|
38646
38656
|
name: "checkJs",
|
|
@@ -38648,7 +38658,7 @@ var ts;
|
|
|
38648
38658
|
showInSimplifiedHelpView: true,
|
|
38649
38659
|
category: ts.Diagnostics.JavaScript_Support,
|
|
38650
38660
|
description: ts.Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
|
|
38651
|
-
defaultValueDescription:
|
|
38661
|
+
defaultValueDescription: false,
|
|
38652
38662
|
},
|
|
38653
38663
|
{
|
|
38654
38664
|
name: "jsx",
|
|
@@ -38660,7 +38670,7 @@ var ts;
|
|
|
38660
38670
|
showInSimplifiedHelpView: true,
|
|
38661
38671
|
category: ts.Diagnostics.Language_and_Environment,
|
|
38662
38672
|
description: ts.Diagnostics.Specify_what_JSX_code_is_generated,
|
|
38663
|
-
defaultValueDescription:
|
|
38673
|
+
defaultValueDescription: undefined,
|
|
38664
38674
|
},
|
|
38665
38675
|
{
|
|
38666
38676
|
name: "declaration",
|
|
@@ -38680,7 +38690,7 @@ var ts;
|
|
|
38680
38690
|
showInSimplifiedHelpView: true,
|
|
38681
38691
|
category: ts.Diagnostics.Emit,
|
|
38682
38692
|
transpileOptionValue: undefined,
|
|
38683
|
-
defaultValueDescription:
|
|
38693
|
+
defaultValueDescription: false,
|
|
38684
38694
|
description: ts.Diagnostics.Create_sourcemaps_for_d_ts_files
|
|
38685
38695
|
},
|
|
38686
38696
|
{
|
|
@@ -38691,7 +38701,7 @@ var ts;
|
|
|
38691
38701
|
category: ts.Diagnostics.Emit,
|
|
38692
38702
|
description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
|
|
38693
38703
|
transpileOptionValue: undefined,
|
|
38694
|
-
defaultValueDescription:
|
|
38704
|
+
defaultValueDescription: false,
|
|
38695
38705
|
},
|
|
38696
38706
|
{
|
|
38697
38707
|
name: "sourceMap",
|
|
@@ -38699,7 +38709,7 @@ var ts;
|
|
|
38699
38709
|
affectsEmit: true,
|
|
38700
38710
|
showInSimplifiedHelpView: true,
|
|
38701
38711
|
category: ts.Diagnostics.Emit,
|
|
38702
|
-
defaultValueDescription:
|
|
38712
|
+
defaultValueDescription: false,
|
|
38703
38713
|
description: ts.Diagnostics.Create_source_map_files_for_emitted_JavaScript_files,
|
|
38704
38714
|
},
|
|
38705
38715
|
{
|
|
@@ -38740,7 +38750,7 @@ var ts;
|
|
|
38740
38750
|
isTSConfigOnly: true,
|
|
38741
38751
|
category: ts.Diagnostics.Projects,
|
|
38742
38752
|
transpileOptionValue: undefined,
|
|
38743
|
-
defaultValueDescription:
|
|
38753
|
+
defaultValueDescription: false,
|
|
38744
38754
|
description: ts.Diagnostics.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references,
|
|
38745
38755
|
},
|
|
38746
38756
|
{
|
|
@@ -38760,7 +38770,7 @@ var ts;
|
|
|
38760
38770
|
affectsEmit: true,
|
|
38761
38771
|
showInSimplifiedHelpView: true,
|
|
38762
38772
|
category: ts.Diagnostics.Emit,
|
|
38763
|
-
defaultValueDescription:
|
|
38773
|
+
defaultValueDescription: false,
|
|
38764
38774
|
description: ts.Diagnostics.Disable_emitting_comments,
|
|
38765
38775
|
},
|
|
38766
38776
|
{
|
|
@@ -38770,7 +38780,7 @@ var ts;
|
|
|
38770
38780
|
category: ts.Diagnostics.Emit,
|
|
38771
38781
|
description: ts.Diagnostics.Disable_emitting_files_from_a_compilation,
|
|
38772
38782
|
transpileOptionValue: undefined,
|
|
38773
|
-
defaultValueDescription:
|
|
38783
|
+
defaultValueDescription: false,
|
|
38774
38784
|
},
|
|
38775
38785
|
{
|
|
38776
38786
|
name: "importHelpers",
|
|
@@ -38778,7 +38788,7 @@ var ts;
|
|
|
38778
38788
|
affectsEmit: true,
|
|
38779
38789
|
category: ts.Diagnostics.Emit,
|
|
38780
38790
|
description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
|
|
38781
|
-
defaultValueDescription:
|
|
38791
|
+
defaultValueDescription: false,
|
|
38782
38792
|
},
|
|
38783
38793
|
{
|
|
38784
38794
|
name: "importsNotUsedAsValues",
|
|
@@ -38790,7 +38800,8 @@ var ts;
|
|
|
38790
38800
|
affectsEmit: true,
|
|
38791
38801
|
affectsSemanticDiagnostics: true,
|
|
38792
38802
|
category: ts.Diagnostics.Emit,
|
|
38793
|
-
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types
|
|
38803
|
+
description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
|
|
38804
|
+
defaultValueDescription: 0 /* Remove */,
|
|
38794
38805
|
},
|
|
38795
38806
|
{
|
|
38796
38807
|
name: "downlevelIteration",
|
|
@@ -38798,7 +38809,7 @@ var ts;
|
|
|
38798
38809
|
affectsEmit: true,
|
|
38799
38810
|
category: ts.Diagnostics.Emit,
|
|
38800
38811
|
description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
|
|
38801
|
-
defaultValueDescription:
|
|
38812
|
+
defaultValueDescription: false,
|
|
38802
38813
|
},
|
|
38803
38814
|
{
|
|
38804
38815
|
name: "isolatedModules",
|
|
@@ -38806,7 +38817,7 @@ var ts;
|
|
|
38806
38817
|
category: ts.Diagnostics.Interop_Constraints,
|
|
38807
38818
|
description: ts.Diagnostics.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,
|
|
38808
38819
|
transpileOptionValue: true,
|
|
38809
|
-
defaultValueDescription:
|
|
38820
|
+
defaultValueDescription: false,
|
|
38810
38821
|
},
|
|
38811
38822
|
// Strict Type Checks
|
|
38812
38823
|
{
|
|
@@ -38817,7 +38828,7 @@ var ts;
|
|
|
38817
38828
|
showInSimplifiedHelpView: true,
|
|
38818
38829
|
category: ts.Diagnostics.Type_Checking,
|
|
38819
38830
|
description: ts.Diagnostics.Enable_all_strict_type_checking_options,
|
|
38820
|
-
defaultValueDescription:
|
|
38831
|
+
defaultValueDescription: false,
|
|
38821
38832
|
},
|
|
38822
38833
|
{
|
|
38823
38834
|
name: "noImplicitAny",
|
|
@@ -38878,7 +38889,7 @@ var ts;
|
|
|
38878
38889
|
strictFlag: true,
|
|
38879
38890
|
category: ts.Diagnostics.Type_Checking,
|
|
38880
38891
|
description: ts.Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
|
|
38881
|
-
defaultValueDescription:
|
|
38892
|
+
defaultValueDescription: false,
|
|
38882
38893
|
},
|
|
38883
38894
|
{
|
|
38884
38895
|
name: "alwaysStrict",
|
|
@@ -38896,7 +38907,7 @@ var ts;
|
|
|
38896
38907
|
affectsSemanticDiagnostics: true,
|
|
38897
38908
|
category: ts.Diagnostics.Type_Checking,
|
|
38898
38909
|
description: ts.Diagnostics.Enable_error_reporting_when_a_local_variables_aren_t_read,
|
|
38899
|
-
defaultValueDescription:
|
|
38910
|
+
defaultValueDescription: false,
|
|
38900
38911
|
},
|
|
38901
38912
|
{
|
|
38902
38913
|
name: "noUnusedParameters",
|
|
@@ -38904,7 +38915,7 @@ var ts;
|
|
|
38904
38915
|
affectsSemanticDiagnostics: true,
|
|
38905
38916
|
category: ts.Diagnostics.Type_Checking,
|
|
38906
38917
|
description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
|
|
38907
|
-
defaultValueDescription:
|
|
38918
|
+
defaultValueDescription: false,
|
|
38908
38919
|
},
|
|
38909
38920
|
{
|
|
38910
38921
|
name: "exactOptionalPropertyTypes",
|
|
@@ -38912,7 +38923,7 @@ var ts;
|
|
|
38912
38923
|
affectsSemanticDiagnostics: true,
|
|
38913
38924
|
category: ts.Diagnostics.Type_Checking,
|
|
38914
38925
|
description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
|
|
38915
|
-
defaultValueDescription:
|
|
38926
|
+
defaultValueDescription: false,
|
|
38916
38927
|
},
|
|
38917
38928
|
{
|
|
38918
38929
|
name: "noImplicitReturns",
|
|
@@ -38920,7 +38931,7 @@ var ts;
|
|
|
38920
38931
|
affectsSemanticDiagnostics: true,
|
|
38921
38932
|
category: ts.Diagnostics.Type_Checking,
|
|
38922
38933
|
description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
|
|
38923
|
-
defaultValueDescription:
|
|
38934
|
+
defaultValueDescription: false,
|
|
38924
38935
|
},
|
|
38925
38936
|
{
|
|
38926
38937
|
name: "noFallthroughCasesInSwitch",
|
|
@@ -38929,7 +38940,7 @@ var ts;
|
|
|
38929
38940
|
affectsSemanticDiagnostics: true,
|
|
38930
38941
|
category: ts.Diagnostics.Type_Checking,
|
|
38931
38942
|
description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
|
|
38932
|
-
defaultValueDescription:
|
|
38943
|
+
defaultValueDescription: false,
|
|
38933
38944
|
},
|
|
38934
38945
|
{
|
|
38935
38946
|
name: "noUncheckedIndexedAccess",
|
|
@@ -38937,7 +38948,7 @@ var ts;
|
|
|
38937
38948
|
affectsSemanticDiagnostics: true,
|
|
38938
38949
|
category: ts.Diagnostics.Type_Checking,
|
|
38939
38950
|
description: ts.Diagnostics.Include_undefined_in_index_signature_results,
|
|
38940
|
-
defaultValueDescription:
|
|
38951
|
+
defaultValueDescription: false,
|
|
38941
38952
|
},
|
|
38942
38953
|
{
|
|
38943
38954
|
name: "noImplicitOverride",
|
|
@@ -38945,7 +38956,7 @@ var ts;
|
|
|
38945
38956
|
affectsSemanticDiagnostics: true,
|
|
38946
38957
|
category: ts.Diagnostics.Type_Checking,
|
|
38947
38958
|
description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
|
|
38948
|
-
defaultValueDescription:
|
|
38959
|
+
defaultValueDescription: false,
|
|
38949
38960
|
},
|
|
38950
38961
|
{
|
|
38951
38962
|
name: "noPropertyAccessFromIndexSignature",
|
|
@@ -38953,7 +38964,7 @@ var ts;
|
|
|
38953
38964
|
showInSimplifiedHelpView: false,
|
|
38954
38965
|
category: ts.Diagnostics.Type_Checking,
|
|
38955
38966
|
description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
|
|
38956
|
-
defaultValueDescription:
|
|
38967
|
+
defaultValueDescription: false,
|
|
38957
38968
|
},
|
|
38958
38969
|
// Module Resolution
|
|
38959
38970
|
{
|
|
@@ -39047,14 +39058,14 @@ var ts;
|
|
|
39047
39058
|
showInSimplifiedHelpView: true,
|
|
39048
39059
|
category: ts.Diagnostics.Interop_Constraints,
|
|
39049
39060
|
description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
|
|
39050
|
-
defaultValueDescription:
|
|
39061
|
+
defaultValueDescription: false,
|
|
39051
39062
|
},
|
|
39052
39063
|
{
|
|
39053
39064
|
name: "preserveSymlinks",
|
|
39054
39065
|
type: "boolean",
|
|
39055
39066
|
category: ts.Diagnostics.Interop_Constraints,
|
|
39056
39067
|
description: ts.Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,
|
|
39057
|
-
defaultValueDescription:
|
|
39068
|
+
defaultValueDescription: false,
|
|
39058
39069
|
},
|
|
39059
39070
|
{
|
|
39060
39071
|
name: "allowUmdGlobalAccess",
|
|
@@ -39062,7 +39073,7 @@ var ts;
|
|
|
39062
39073
|
affectsSemanticDiagnostics: true,
|
|
39063
39074
|
category: ts.Diagnostics.Modules,
|
|
39064
39075
|
description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
|
|
39065
|
-
defaultValueDescription:
|
|
39076
|
+
defaultValueDescription: false,
|
|
39066
39077
|
},
|
|
39067
39078
|
// Source Maps
|
|
39068
39079
|
{
|
|
@@ -39087,7 +39098,7 @@ var ts;
|
|
|
39087
39098
|
affectsEmit: true,
|
|
39088
39099
|
category: ts.Diagnostics.Emit,
|
|
39089
39100
|
description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
|
|
39090
|
-
defaultValueDescription:
|
|
39101
|
+
defaultValueDescription: false,
|
|
39091
39102
|
},
|
|
39092
39103
|
{
|
|
39093
39104
|
name: "inlineSources",
|
|
@@ -39095,7 +39106,7 @@ var ts;
|
|
|
39095
39106
|
affectsEmit: true,
|
|
39096
39107
|
category: ts.Diagnostics.Emit,
|
|
39097
39108
|
description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
|
|
39098
|
-
defaultValueDescription:
|
|
39109
|
+
defaultValueDescription: false,
|
|
39099
39110
|
},
|
|
39100
39111
|
// Experimental
|
|
39101
39112
|
{
|
|
@@ -39104,7 +39115,7 @@ var ts;
|
|
|
39104
39115
|
affectsSemanticDiagnostics: true,
|
|
39105
39116
|
category: ts.Diagnostics.Language_and_Environment,
|
|
39106
39117
|
description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
|
|
39107
|
-
defaultValueDescription:
|
|
39118
|
+
defaultValueDescription: false,
|
|
39108
39119
|
},
|
|
39109
39120
|
{
|
|
39110
39121
|
name: "emitDecoratorMetadata",
|
|
@@ -39113,7 +39124,7 @@ var ts;
|
|
|
39113
39124
|
affectsEmit: true,
|
|
39114
39125
|
category: ts.Diagnostics.Language_and_Environment,
|
|
39115
39126
|
description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
|
|
39116
|
-
defaultValueDescription:
|
|
39127
|
+
defaultValueDescription: false,
|
|
39117
39128
|
},
|
|
39118
39129
|
// Advanced
|
|
39119
39130
|
{
|
|
@@ -39145,7 +39156,7 @@ var ts;
|
|
|
39145
39156
|
affectsModuleResolution: true,
|
|
39146
39157
|
category: ts.Diagnostics.Modules,
|
|
39147
39158
|
description: ts.Diagnostics.Enable_importing_json_files,
|
|
39148
|
-
defaultValueDescription:
|
|
39159
|
+
defaultValueDescription: false,
|
|
39149
39160
|
},
|
|
39150
39161
|
{
|
|
39151
39162
|
name: "out",
|
|
@@ -39171,7 +39182,7 @@ var ts;
|
|
|
39171
39182
|
type: "boolean",
|
|
39172
39183
|
category: ts.Diagnostics.Completeness,
|
|
39173
39184
|
description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
|
|
39174
|
-
defaultValueDescription:
|
|
39185
|
+
defaultValueDescription: false,
|
|
39175
39186
|
},
|
|
39176
39187
|
{
|
|
39177
39188
|
name: "charset",
|
|
@@ -39186,7 +39197,7 @@ var ts;
|
|
|
39186
39197
|
affectsEmit: true,
|
|
39187
39198
|
category: ts.Diagnostics.Emit,
|
|
39188
39199
|
description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
|
|
39189
|
-
defaultValueDescription:
|
|
39200
|
+
defaultValueDescription: false,
|
|
39190
39201
|
},
|
|
39191
39202
|
{
|
|
39192
39203
|
name: "newLine",
|
|
@@ -39206,7 +39217,7 @@ var ts;
|
|
|
39206
39217
|
affectsSemanticDiagnostics: true,
|
|
39207
39218
|
category: ts.Diagnostics.Output_Formatting,
|
|
39208
39219
|
description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
|
|
39209
|
-
defaultValueDescription:
|
|
39220
|
+
defaultValueDescription: false,
|
|
39210
39221
|
},
|
|
39211
39222
|
{
|
|
39212
39223
|
name: "noLib",
|
|
@@ -39217,7 +39228,7 @@ var ts;
|
|
|
39217
39228
|
// We are not returning a sourceFile for lib file when asked by the program,
|
|
39218
39229
|
// so pass --noLib to avoid reporting a file not found error.
|
|
39219
39230
|
transpileOptionValue: true,
|
|
39220
|
-
defaultValueDescription:
|
|
39231
|
+
defaultValueDescription: false,
|
|
39221
39232
|
},
|
|
39222
39233
|
{
|
|
39223
39234
|
name: "noResolve",
|
|
@@ -39228,7 +39239,7 @@ var ts;
|
|
|
39228
39239
|
// We are not doing a full typecheck, we are not resolving the whole context,
|
|
39229
39240
|
// so pass --noResolve to avoid reporting missing file errors.
|
|
39230
39241
|
transpileOptionValue: true,
|
|
39231
|
-
defaultValueDescription:
|
|
39242
|
+
defaultValueDescription: false,
|
|
39232
39243
|
},
|
|
39233
39244
|
{
|
|
39234
39245
|
name: "stripInternal",
|
|
@@ -39236,7 +39247,7 @@ var ts;
|
|
|
39236
39247
|
affectsEmit: true,
|
|
39237
39248
|
category: ts.Diagnostics.Emit,
|
|
39238
39249
|
description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
|
|
39239
|
-
defaultValueDescription:
|
|
39250
|
+
defaultValueDescription: false,
|
|
39240
39251
|
},
|
|
39241
39252
|
{
|
|
39242
39253
|
name: "disableSizeLimit",
|
|
@@ -39244,7 +39255,7 @@ var ts;
|
|
|
39244
39255
|
affectsProgramStructure: true,
|
|
39245
39256
|
category: ts.Diagnostics.Editor_Support,
|
|
39246
39257
|
description: ts.Diagnostics.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,
|
|
39247
|
-
defaultValueDescription:
|
|
39258
|
+
defaultValueDescription: false,
|
|
39248
39259
|
},
|
|
39249
39260
|
{
|
|
39250
39261
|
name: "disableSourceOfProjectReferenceRedirect",
|
|
@@ -39252,7 +39263,7 @@ var ts;
|
|
|
39252
39263
|
isTSConfigOnly: true,
|
|
39253
39264
|
category: ts.Diagnostics.Projects,
|
|
39254
39265
|
description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,
|
|
39255
|
-
defaultValueDescription:
|
|
39266
|
+
defaultValueDescription: false,
|
|
39256
39267
|
},
|
|
39257
39268
|
{
|
|
39258
39269
|
name: "disableSolutionSearching",
|
|
@@ -39260,7 +39271,7 @@ var ts;
|
|
|
39260
39271
|
isTSConfigOnly: true,
|
|
39261
39272
|
category: ts.Diagnostics.Projects,
|
|
39262
39273
|
description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,
|
|
39263
|
-
defaultValueDescription:
|
|
39274
|
+
defaultValueDescription: false,
|
|
39264
39275
|
},
|
|
39265
39276
|
{
|
|
39266
39277
|
name: "disableReferencedProjectLoad",
|
|
@@ -39268,7 +39279,7 @@ var ts;
|
|
|
39268
39279
|
isTSConfigOnly: true,
|
|
39269
39280
|
category: ts.Diagnostics.Projects,
|
|
39270
39281
|
description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,
|
|
39271
|
-
defaultValueDescription:
|
|
39282
|
+
defaultValueDescription: false,
|
|
39272
39283
|
},
|
|
39273
39284
|
{
|
|
39274
39285
|
name: "noImplicitUseStrict",
|
|
@@ -39276,7 +39287,7 @@ var ts;
|
|
|
39276
39287
|
affectsSemanticDiagnostics: true,
|
|
39277
39288
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39278
39289
|
description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
|
|
39279
|
-
defaultValueDescription:
|
|
39290
|
+
defaultValueDescription: false,
|
|
39280
39291
|
},
|
|
39281
39292
|
{
|
|
39282
39293
|
name: "noEmitHelpers",
|
|
@@ -39284,7 +39295,7 @@ var ts;
|
|
|
39284
39295
|
affectsEmit: true,
|
|
39285
39296
|
category: ts.Diagnostics.Emit,
|
|
39286
39297
|
description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
|
|
39287
|
-
defaultValueDescription:
|
|
39298
|
+
defaultValueDescription: false,
|
|
39288
39299
|
},
|
|
39289
39300
|
{
|
|
39290
39301
|
name: "noEmitOnError",
|
|
@@ -39293,7 +39304,7 @@ var ts;
|
|
|
39293
39304
|
category: ts.Diagnostics.Emit,
|
|
39294
39305
|
transpileOptionValue: undefined,
|
|
39295
39306
|
description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
|
|
39296
|
-
defaultValueDescription:
|
|
39307
|
+
defaultValueDescription: false,
|
|
39297
39308
|
},
|
|
39298
39309
|
{
|
|
39299
39310
|
name: "preserveConstEnums",
|
|
@@ -39301,7 +39312,7 @@ var ts;
|
|
|
39301
39312
|
affectsEmit: true,
|
|
39302
39313
|
category: ts.Diagnostics.Emit,
|
|
39303
39314
|
description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
|
|
39304
|
-
defaultValueDescription:
|
|
39315
|
+
defaultValueDescription: false,
|
|
39305
39316
|
},
|
|
39306
39317
|
{
|
|
39307
39318
|
name: "declarationDir",
|
|
@@ -39318,7 +39329,7 @@ var ts;
|
|
|
39318
39329
|
type: "boolean",
|
|
39319
39330
|
category: ts.Diagnostics.Completeness,
|
|
39320
39331
|
description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
|
|
39321
|
-
defaultValueDescription:
|
|
39332
|
+
defaultValueDescription: false,
|
|
39322
39333
|
},
|
|
39323
39334
|
{
|
|
39324
39335
|
name: "allowUnusedLabels",
|
|
@@ -39327,7 +39338,7 @@ var ts;
|
|
|
39327
39338
|
affectsSemanticDiagnostics: true,
|
|
39328
39339
|
category: ts.Diagnostics.Type_Checking,
|
|
39329
39340
|
description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
|
|
39330
|
-
defaultValueDescription:
|
|
39341
|
+
defaultValueDescription: undefined,
|
|
39331
39342
|
},
|
|
39332
39343
|
{
|
|
39333
39344
|
name: "allowUnreachableCode",
|
|
@@ -39336,7 +39347,7 @@ var ts;
|
|
|
39336
39347
|
affectsSemanticDiagnostics: true,
|
|
39337
39348
|
category: ts.Diagnostics.Type_Checking,
|
|
39338
39349
|
description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
|
|
39339
|
-
defaultValueDescription:
|
|
39350
|
+
defaultValueDescription: undefined,
|
|
39340
39351
|
},
|
|
39341
39352
|
{
|
|
39342
39353
|
name: "suppressExcessPropertyErrors",
|
|
@@ -39344,7 +39355,7 @@ var ts;
|
|
|
39344
39355
|
affectsSemanticDiagnostics: true,
|
|
39345
39356
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39346
39357
|
description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
|
|
39347
|
-
defaultValueDescription:
|
|
39358
|
+
defaultValueDescription: false,
|
|
39348
39359
|
},
|
|
39349
39360
|
{
|
|
39350
39361
|
name: "suppressImplicitAnyIndexErrors",
|
|
@@ -39352,7 +39363,7 @@ var ts;
|
|
|
39352
39363
|
affectsSemanticDiagnostics: true,
|
|
39353
39364
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39354
39365
|
description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
|
|
39355
|
-
defaultValueDescription:
|
|
39366
|
+
defaultValueDescription: false,
|
|
39356
39367
|
},
|
|
39357
39368
|
{
|
|
39358
39369
|
name: "forceConsistentCasingInFileNames",
|
|
@@ -39360,7 +39371,7 @@ var ts;
|
|
|
39360
39371
|
affectsModuleResolution: true,
|
|
39361
39372
|
category: ts.Diagnostics.Interop_Constraints,
|
|
39362
39373
|
description: ts.Diagnostics.Ensure_that_casing_is_correct_in_imports,
|
|
39363
|
-
defaultValueDescription:
|
|
39374
|
+
defaultValueDescription: false,
|
|
39364
39375
|
},
|
|
39365
39376
|
{
|
|
39366
39377
|
name: "maxNodeModuleJsDepth",
|
|
@@ -39368,7 +39379,7 @@ var ts;
|
|
|
39368
39379
|
affectsModuleResolution: true,
|
|
39369
39380
|
category: ts.Diagnostics.JavaScript_Support,
|
|
39370
39381
|
description: ts.Diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,
|
|
39371
|
-
defaultValueDescription:
|
|
39382
|
+
defaultValueDescription: 0,
|
|
39372
39383
|
},
|
|
39373
39384
|
{
|
|
39374
39385
|
name: "noStrictGenericChecks",
|
|
@@ -39376,7 +39387,7 @@ var ts;
|
|
|
39376
39387
|
affectsSemanticDiagnostics: true,
|
|
39377
39388
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39378
39389
|
description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
|
|
39379
|
-
defaultValueDescription:
|
|
39390
|
+
defaultValueDescription: false,
|
|
39380
39391
|
},
|
|
39381
39392
|
{
|
|
39382
39393
|
name: "useDefineForClassFields",
|
|
@@ -39393,14 +39404,14 @@ var ts;
|
|
|
39393
39404
|
affectsEmit: true,
|
|
39394
39405
|
category: ts.Diagnostics.Emit,
|
|
39395
39406
|
description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
|
|
39396
|
-
defaultValueDescription:
|
|
39407
|
+
defaultValueDescription: false,
|
|
39397
39408
|
},
|
|
39398
39409
|
{
|
|
39399
39410
|
name: "keyofStringsOnly",
|
|
39400
39411
|
type: "boolean",
|
|
39401
39412
|
category: ts.Diagnostics.Backwards_Compatibility,
|
|
39402
39413
|
description: ts.Diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,
|
|
39403
|
-
defaultValueDescription:
|
|
39414
|
+
defaultValueDescription: false,
|
|
39404
39415
|
},
|
|
39405
39416
|
{
|
|
39406
39417
|
// A list of plugins to load in the language service
|
|
@@ -39442,7 +39453,7 @@ var ts;
|
|
|
39442
39453
|
category: ts.Diagnostics.Command_line_Options,
|
|
39443
39454
|
description: ts.Diagnostics.Enable_verbose_logging,
|
|
39444
39455
|
type: "boolean",
|
|
39445
|
-
defaultValueDescription:
|
|
39456
|
+
defaultValueDescription: false,
|
|
39446
39457
|
},
|
|
39447
39458
|
{
|
|
39448
39459
|
name: "dry",
|
|
@@ -39450,7 +39461,7 @@ var ts;
|
|
|
39450
39461
|
category: ts.Diagnostics.Command_line_Options,
|
|
39451
39462
|
description: ts.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,
|
|
39452
39463
|
type: "boolean",
|
|
39453
|
-
defaultValueDescription:
|
|
39464
|
+
defaultValueDescription: false,
|
|
39454
39465
|
},
|
|
39455
39466
|
{
|
|
39456
39467
|
name: "force",
|
|
@@ -39458,14 +39469,14 @@ var ts;
|
|
|
39458
39469
|
category: ts.Diagnostics.Command_line_Options,
|
|
39459
39470
|
description: ts.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,
|
|
39460
39471
|
type: "boolean",
|
|
39461
|
-
defaultValueDescription:
|
|
39472
|
+
defaultValueDescription: false,
|
|
39462
39473
|
},
|
|
39463
39474
|
{
|
|
39464
39475
|
name: "clean",
|
|
39465
39476
|
category: ts.Diagnostics.Command_line_Options,
|
|
39466
39477
|
description: ts.Diagnostics.Delete_the_outputs_of_all_projects,
|
|
39467
39478
|
type: "boolean",
|
|
39468
|
-
defaultValueDescription:
|
|
39479
|
+
defaultValueDescription: false,
|
|
39469
39480
|
}
|
|
39470
39481
|
];
|
|
39471
39482
|
/* @internal */
|
|
@@ -39478,12 +39489,12 @@ var ts;
|
|
|
39478
39489
|
*/
|
|
39479
39490
|
name: "enableAutoDiscovery",
|
|
39480
39491
|
type: "boolean",
|
|
39481
|
-
defaultValueDescription:
|
|
39492
|
+
defaultValueDescription: false,
|
|
39482
39493
|
},
|
|
39483
39494
|
{
|
|
39484
39495
|
name: "enable",
|
|
39485
39496
|
type: "boolean",
|
|
39486
|
-
defaultValueDescription:
|
|
39497
|
+
defaultValueDescription: false,
|
|
39487
39498
|
},
|
|
39488
39499
|
{
|
|
39489
39500
|
name: "include",
|
|
@@ -39504,7 +39515,7 @@ var ts;
|
|
|
39504
39515
|
{
|
|
39505
39516
|
name: "disableFilenameBasedTypeAcquisition",
|
|
39506
39517
|
type: "boolean",
|
|
39507
|
-
defaultValueDescription:
|
|
39518
|
+
defaultValueDescription: false,
|
|
39508
39519
|
},
|
|
39509
39520
|
];
|
|
39510
39521
|
/*@internal*/
|
|
@@ -91104,11 +91115,10 @@ var ts;
|
|
|
91104
91115
|
// we can safely elide the parentheses here, as a new synthetic
|
|
91105
91116
|
// ParenthesizedExpression will be inserted if we remove parentheses too
|
|
91106
91117
|
// aggressively.
|
|
91107
|
-
//
|
|
91108
|
-
//
|
|
91109
|
-
|
|
91110
|
-
|
|
91111
|
-
}
|
|
91118
|
+
//
|
|
91119
|
+
// If there are leading comments on the expression itself, the emitter will handle ASI
|
|
91120
|
+
// for return, throw, and yield by re-introducing parenthesis during emit on an as-need
|
|
91121
|
+
// basis.
|
|
91112
91122
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
91113
91123
|
}
|
|
91114
91124
|
return ts.visitEachChild(node, visitor, context);
|
|
@@ -95056,11 +95066,11 @@ var ts;
|
|
|
95056
95066
|
}
|
|
95057
95067
|
function visitOptionalExpression(node, captureThisArg, isDelete) {
|
|
95058
95068
|
var _a = flattenChain(node), expression = _a.expression, chain = _a.chain;
|
|
95059
|
-
var left = visitNonOptionalExpression(expression, ts.isCallChain(chain[0]), /*isDelete*/ false);
|
|
95069
|
+
var left = visitNonOptionalExpression(ts.skipPartiallyEmittedExpressions(expression), ts.isCallChain(chain[0]), /*isDelete*/ false);
|
|
95060
95070
|
var leftThisArg = ts.isSyntheticReference(left) ? left.thisArg : undefined;
|
|
95061
|
-
var
|
|
95062
|
-
var
|
|
95063
|
-
if (!ts.isSimpleCopiableExpression(
|
|
95071
|
+
var capturedLeft = ts.isSyntheticReference(left) ? left.expression : left;
|
|
95072
|
+
var leftExpression = factory.restoreOuterExpressions(expression, capturedLeft, 8 /* PartiallyEmittedExpressions */);
|
|
95073
|
+
if (!ts.isSimpleCopiableExpression(capturedLeft)) {
|
|
95064
95074
|
capturedLeft = factory.createTempVariable(hoistVariableDeclaration);
|
|
95065
95075
|
leftExpression = factory.createAssignment(capturedLeft, leftExpression);
|
|
95066
95076
|
}
|
|
@@ -95086,6 +95096,10 @@ var ts;
|
|
|
95086
95096
|
break;
|
|
95087
95097
|
case 207 /* CallExpression */:
|
|
95088
95098
|
if (i === 0 && leftThisArg) {
|
|
95099
|
+
if (!ts.isGeneratedIdentifier(leftThisArg)) {
|
|
95100
|
+
leftThisArg = factory.cloneNode(leftThisArg);
|
|
95101
|
+
ts.addEmitFlags(leftThisArg, 1536 /* NoComments */);
|
|
95102
|
+
}
|
|
95089
95103
|
rightExpression = factory.createFunctionCallCall(rightExpression, leftThisArg.kind === 106 /* SuperKeyword */ ? factory.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression));
|
|
95090
95104
|
}
|
|
95091
95105
|
else {
|
|
@@ -109868,7 +109882,7 @@ var ts;
|
|
|
109868
109882
|
function emitYieldExpression(node) {
|
|
109869
109883
|
emitTokenWithComment(125 /* YieldKeyword */, node.pos, writeKeyword, node);
|
|
109870
109884
|
emit(node.asteriskToken);
|
|
109871
|
-
emitExpressionWithLeadingSpace(node.expression
|
|
109885
|
+
emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsiAndDisallowedComma);
|
|
109872
109886
|
}
|
|
109873
109887
|
function emitSpreadElement(node) {
|
|
109874
109888
|
emitTokenWithComment(25 /* DotDotDotToken */, node.pos, writePunctuation, node);
|
|
@@ -110065,9 +110079,49 @@ var ts;
|
|
|
110065
110079
|
}
|
|
110066
110080
|
return pos;
|
|
110067
110081
|
}
|
|
110082
|
+
function commentWillEmitNewLine(node) {
|
|
110083
|
+
return node.kind === 2 /* SingleLineCommentTrivia */ || !!node.hasTrailingNewLine;
|
|
110084
|
+
}
|
|
110085
|
+
function willEmitLeadingNewLine(node) {
|
|
110086
|
+
if (!currentSourceFile)
|
|
110087
|
+
return false;
|
|
110088
|
+
if (ts.some(ts.getLeadingCommentRanges(currentSourceFile.text, node.pos), commentWillEmitNewLine))
|
|
110089
|
+
return true;
|
|
110090
|
+
if (ts.some(ts.getSyntheticLeadingComments(node), commentWillEmitNewLine))
|
|
110091
|
+
return true;
|
|
110092
|
+
if (ts.isPartiallyEmittedExpression(node)) {
|
|
110093
|
+
if (node.pos !== node.expression.pos) {
|
|
110094
|
+
if (ts.some(ts.getTrailingCommentRanges(currentSourceFile.text, node.expression.pos), commentWillEmitNewLine))
|
|
110095
|
+
return true;
|
|
110096
|
+
}
|
|
110097
|
+
return willEmitLeadingNewLine(node.expression);
|
|
110098
|
+
}
|
|
110099
|
+
return false;
|
|
110100
|
+
}
|
|
110101
|
+
/**
|
|
110102
|
+
* Wraps an expression in parens if we would emit a leading comment that would introduce a line separator
|
|
110103
|
+
* between the node and its parent.
|
|
110104
|
+
*/
|
|
110105
|
+
function parenthesizeExpressionForNoAsi(node) {
|
|
110106
|
+
if (!commentsDisabled && ts.isPartiallyEmittedExpression(node) && willEmitLeadingNewLine(node)) {
|
|
110107
|
+
var parseNode = ts.getParseTreeNode(node);
|
|
110108
|
+
if (parseNode && ts.isParenthesizedExpression(parseNode)) {
|
|
110109
|
+
// If the original node was a parenthesized expression, restore it to preserve comment and source map emit
|
|
110110
|
+
var parens = ts.factory.createParenthesizedExpression(node.expression);
|
|
110111
|
+
ts.setOriginalNode(parens, node);
|
|
110112
|
+
ts.setTextRange(parens, parseNode);
|
|
110113
|
+
return parens;
|
|
110114
|
+
}
|
|
110115
|
+
return ts.factory.createParenthesizedExpression(node);
|
|
110116
|
+
}
|
|
110117
|
+
return node;
|
|
110118
|
+
}
|
|
110119
|
+
function parenthesizeExpressionForNoAsiAndDisallowedComma(node) {
|
|
110120
|
+
return parenthesizeExpressionForNoAsi(parenthesizer.parenthesizeExpressionForDisallowedComma(node));
|
|
110121
|
+
}
|
|
110068
110122
|
function emitReturnStatement(node) {
|
|
110069
110123
|
emitTokenWithComment(105 /* ReturnKeyword */, node.pos, writeKeyword, /*contextNode*/ node);
|
|
110070
|
-
emitExpressionWithLeadingSpace(node.expression);
|
|
110124
|
+
emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi);
|
|
110071
110125
|
writeTrailingSemicolon();
|
|
110072
110126
|
}
|
|
110073
110127
|
function emitWithStatement(node) {
|
|
@@ -110095,7 +110149,7 @@ var ts;
|
|
|
110095
110149
|
}
|
|
110096
110150
|
function emitThrowStatement(node) {
|
|
110097
110151
|
emitTokenWithComment(109 /* ThrowKeyword */, node.pos, writeKeyword, node);
|
|
110098
|
-
emitExpressionWithLeadingSpace(node.expression);
|
|
110152
|
+
emitExpressionWithLeadingSpace(parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi);
|
|
110099
110153
|
writeTrailingSemicolon();
|
|
110100
110154
|
}
|
|
110101
110155
|
function emitTryStatement(node) {
|
|
@@ -110939,7 +110993,14 @@ var ts;
|
|
|
110939
110993
|
}
|
|
110940
110994
|
// Transformation nodes
|
|
110941
110995
|
function emitPartiallyEmittedExpression(node) {
|
|
110996
|
+
var emitFlags = ts.getEmitFlags(node);
|
|
110997
|
+
if (!(emitFlags & 512 /* NoLeadingComments */) && node.pos !== node.expression.pos) {
|
|
110998
|
+
emitTrailingCommentsOfPosition(node.expression.pos);
|
|
110999
|
+
}
|
|
110942
111000
|
emitExpression(node.expression);
|
|
111001
|
+
if (!(emitFlags & 1024 /* NoTrailingComments */) && node.end !== node.expression.end) {
|
|
111002
|
+
emitLeadingCommentsOfPosition(node.expression.end);
|
|
111003
|
+
}
|
|
110943
111004
|
}
|
|
110944
111005
|
function emitCommaList(node) {
|
|
110945
111006
|
emitExpressionList(node, node.elements, 528 /* CommaListElements */, /*parenthesizerRule*/ undefined);
|
|
@@ -111303,10 +111364,8 @@ var ts;
|
|
|
111303
111364
|
// Emit this child.
|
|
111304
111365
|
previousSourceFileTextKind = recordBundleFileInternalSectionStart(child);
|
|
111305
111366
|
if (shouldEmitInterveningComments) {
|
|
111306
|
-
|
|
111307
|
-
|
|
111308
|
-
emitTrailingCommentsOfPosition(commentRange.pos);
|
|
111309
|
-
}
|
|
111367
|
+
var commentRange = ts.getCommentRange(child);
|
|
111368
|
+
emitTrailingCommentsOfPosition(commentRange.pos);
|
|
111310
111369
|
}
|
|
111311
111370
|
else {
|
|
111312
111371
|
shouldEmitInterveningComments = mayEmitInterveningComments;
|
|
@@ -111627,7 +111686,7 @@ var ts;
|
|
|
111627
111686
|
function writeLineSeparatorsAndIndentBefore(node, parent) {
|
|
111628
111687
|
var leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent, [node], 0 /* None */);
|
|
111629
111688
|
if (leadingNewlines) {
|
|
111630
|
-
writeLinesAndIndent(leadingNewlines, /*
|
|
111689
|
+
writeLinesAndIndent(leadingNewlines, /*writeSpaceIfNotIndenting*/ false);
|
|
111631
111690
|
}
|
|
111632
111691
|
return !!leadingNewlines;
|
|
111633
111692
|
}
|
|
@@ -126005,7 +126064,6 @@ var ts;
|
|
|
126005
126064
|
|| kind === 165 /* PropertySignature */
|
|
126006
126065
|
|| kind === 167 /* MethodSignature */;
|
|
126007
126066
|
}
|
|
126008
|
-
ts.syntaxRequiresTrailingCommaOrSemicolonOrASI = syntaxRequiresTrailingCommaOrSemicolonOrASI;
|
|
126009
126067
|
function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) {
|
|
126010
126068
|
return kind === 255 /* FunctionDeclaration */
|
|
126011
126069
|
|| kind === 170 /* Constructor */
|
|
@@ -126013,11 +126071,9 @@ var ts;
|
|
|
126013
126071
|
|| kind === 171 /* GetAccessor */
|
|
126014
126072
|
|| kind === 172 /* SetAccessor */;
|
|
126015
126073
|
}
|
|
126016
|
-
ts.syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI = syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI;
|
|
126017
126074
|
function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) {
|
|
126018
126075
|
return kind === 260 /* ModuleDeclaration */;
|
|
126019
126076
|
}
|
|
126020
|
-
ts.syntaxRequiresTrailingModuleBlockOrSemicolonOrASI = syntaxRequiresTrailingModuleBlockOrSemicolonOrASI;
|
|
126021
126077
|
function syntaxRequiresTrailingSemicolonOrASI(kind) {
|
|
126022
126078
|
return kind === 236 /* VariableStatement */
|
|
126023
126079
|
|| kind === 237 /* ExpressionStatement */
|
|
@@ -126092,19 +126148,34 @@ var ts;
|
|
|
126092
126148
|
ts.forEachChild(sourceFile, function visit(node) {
|
|
126093
126149
|
if (syntaxRequiresTrailingSemicolonOrASI(node.kind)) {
|
|
126094
126150
|
var lastToken = node.getLastToken(sourceFile);
|
|
126095
|
-
if (lastToken
|
|
126151
|
+
if ((lastToken === null || lastToken === void 0 ? void 0 : lastToken.kind) === 26 /* SemicolonToken */) {
|
|
126096
126152
|
withSemicolon++;
|
|
126097
126153
|
}
|
|
126098
126154
|
else {
|
|
126099
126155
|
withoutSemicolon++;
|
|
126100
126156
|
}
|
|
126101
126157
|
}
|
|
126158
|
+
else if (syntaxRequiresTrailingCommaOrSemicolonOrASI(node.kind)) {
|
|
126159
|
+
var lastToken = node.getLastToken(sourceFile);
|
|
126160
|
+
if ((lastToken === null || lastToken === void 0 ? void 0 : lastToken.kind) === 26 /* SemicolonToken */) {
|
|
126161
|
+
withSemicolon++;
|
|
126162
|
+
}
|
|
126163
|
+
else if (lastToken && lastToken.kind !== 27 /* CommaToken */) {
|
|
126164
|
+
var lastTokenLine = ts.getLineAndCharacterOfPosition(sourceFile, lastToken.getStart(sourceFile)).line;
|
|
126165
|
+
var nextTokenLine = ts.getLineAndCharacterOfPosition(sourceFile, ts.getSpanOfTokenAtPosition(sourceFile, lastToken.end).start).line;
|
|
126166
|
+
// Avoid counting missing semicolon in single-line objects:
|
|
126167
|
+
// `function f(p: { x: string /*no semicolon here is insignificant*/ }) {`
|
|
126168
|
+
if (lastTokenLine !== nextTokenLine) {
|
|
126169
|
+
withoutSemicolon++;
|
|
126170
|
+
}
|
|
126171
|
+
}
|
|
126172
|
+
}
|
|
126102
126173
|
if (withSemicolon + withoutSemicolon >= nStatementsToObserve) {
|
|
126103
126174
|
return true;
|
|
126104
126175
|
}
|
|
126105
126176
|
return ts.forEachChild(node, visit);
|
|
126106
126177
|
});
|
|
126107
|
-
// One statement missing a semicolon isn
|
|
126178
|
+
// One statement missing a semicolon isn't sufficient evidence to say the user
|
|
126108
126179
|
// doesn’t want semicolons, because they may not even be done writing that statement.
|
|
126109
126180
|
if (withSemicolon === 0 && withoutSemicolon <= 1) {
|
|
126110
126181
|
return true;
|
|
@@ -141970,6 +142041,7 @@ var ts;
|
|
|
141970
142041
|
lastTrailingTriviaWasNewLine: function () { return wasNewLine; },
|
|
141971
142042
|
skipToEndOf: skipToEndOf,
|
|
141972
142043
|
skipToStartOf: skipToStartOf,
|
|
142044
|
+
getStartPos: function () { var _a; return (_a = lastTokenInfo === null || lastTokenInfo === void 0 ? void 0 : lastTokenInfo.token.pos) !== null && _a !== void 0 ? _a : scanner.getTokenPos(); },
|
|
141973
142045
|
});
|
|
141974
142046
|
lastTokenInfo = undefined;
|
|
141975
142047
|
scanner.setText(undefined);
|
|
@@ -142143,8 +142215,7 @@ var ts;
|
|
|
142143
142215
|
}
|
|
142144
142216
|
function isOnToken() {
|
|
142145
142217
|
var current = lastTokenInfo ? lastTokenInfo.token.kind : scanner.getToken();
|
|
142146
|
-
|
|
142147
|
-
return startPos < endPos && current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current);
|
|
142218
|
+
return current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current);
|
|
142148
142219
|
}
|
|
142149
142220
|
function isOnEOF() {
|
|
142150
142221
|
var current = lastTokenInfo ? lastTokenInfo.token.kind : scanner.getToken();
|
|
@@ -143332,7 +143403,7 @@ var ts;
|
|
|
143332
143403
|
return 0;
|
|
143333
143404
|
}
|
|
143334
143405
|
function formatNodeGivenIndentation(node, sourceFileLike, languageVariant, initialIndentation, delta, formatContext) {
|
|
143335
|
-
var range = { pos:
|
|
143406
|
+
var range = { pos: node.pos, end: node.end };
|
|
143336
143407
|
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
|
|
143337
143408
|
sourceFileLike); });
|
|
143338
143409
|
}
|
|
@@ -143383,6 +143454,15 @@ var ts;
|
|
|
143383
143454
|
}
|
|
143384
143455
|
}
|
|
143385
143456
|
}
|
|
143457
|
+
if (previousRange && formattingScanner.getStartPos() >= originalRange.end) {
|
|
143458
|
+
var token = formattingScanner.isOnEOF() ? formattingScanner.readEOFTokenRange() :
|
|
143459
|
+
formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(enclosingNode).token :
|
|
143460
|
+
undefined;
|
|
143461
|
+
if (token) {
|
|
143462
|
+
processPair(token, sourceFile.getLineAndCharacterOfPosition(token.pos).line, enclosingNode, previousRange, previousRangeStartLine, previousParent, enclosingNode,
|
|
143463
|
+
/*dynamicIndentation*/ undefined);
|
|
143464
|
+
}
|
|
143465
|
+
}
|
|
143386
143466
|
return edits;
|
|
143387
143467
|
// local functions
|
|
143388
143468
|
/** Tries to compute the indentation for a list element.
|
|
@@ -143565,19 +143645,13 @@ var ts;
|
|
|
143565
143645
|
processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation);
|
|
143566
143646
|
});
|
|
143567
143647
|
// proceed any tokens in the node that are located after child nodes
|
|
143568
|
-
while (formattingScanner.isOnToken()) {
|
|
143648
|
+
while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) {
|
|
143569
143649
|
var tokenInfo = formattingScanner.readTokenInfo(node);
|
|
143570
|
-
if (tokenInfo.token.end > node.end) {
|
|
143650
|
+
if (tokenInfo.token.end > Math.min(node.end, originalRange.end)) {
|
|
143571
143651
|
break;
|
|
143572
143652
|
}
|
|
143573
143653
|
consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node);
|
|
143574
143654
|
}
|
|
143575
|
-
if (!node.parent && formattingScanner.isOnEOF()) {
|
|
143576
|
-
var token = formattingScanner.readEOFTokenRange();
|
|
143577
|
-
if (token.end <= node.end && previousRange) {
|
|
143578
|
-
processPair(token, sourceFile.getLineAndCharacterOfPosition(token.pos).line, node, previousRange, previousRangeStartLine, previousParent, contextNode, nodeDynamicIndentation);
|
|
143579
|
-
}
|
|
143580
|
-
}
|
|
143581
143655
|
function processChildNode(child, inheritedIndentation, parent, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) {
|
|
143582
143656
|
var childStartPos = child.getStart(sourceFile);
|
|
143583
143657
|
var childStartLine = sourceFile.getLineAndCharacterOfPosition(childStartPos).line;
|
|
@@ -143603,9 +143677,12 @@ var ts;
|
|
|
143603
143677
|
if (child.getFullWidth() === 0) {
|
|
143604
143678
|
return inheritedIndentation;
|
|
143605
143679
|
}
|
|
143606
|
-
while (formattingScanner.isOnToken()) {
|
|
143680
|
+
while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) {
|
|
143607
143681
|
// proceed any parent tokens that are located prior to child.getStart()
|
|
143608
143682
|
var tokenInfo = formattingScanner.readTokenInfo(node);
|
|
143683
|
+
if (tokenInfo.token.end > originalRange.end) {
|
|
143684
|
+
return inheritedIndentation;
|
|
143685
|
+
}
|
|
143609
143686
|
if (tokenInfo.token.end > childStartPos) {
|
|
143610
143687
|
if (tokenInfo.token.pos > childStartPos) {
|
|
143611
143688
|
formattingScanner.skipToStartOf(child);
|
|
@@ -143615,7 +143692,7 @@ var ts;
|
|
|
143615
143692
|
}
|
|
143616
143693
|
consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node);
|
|
143617
143694
|
}
|
|
143618
|
-
if (!formattingScanner.isOnToken()) {
|
|
143695
|
+
if (!formattingScanner.isOnToken() || formattingScanner.getStartPos() >= originalRange.end) {
|
|
143619
143696
|
return inheritedIndentation;
|
|
143620
143697
|
}
|
|
143621
143698
|
if (ts.isToken(child)) {
|
|
@@ -143644,7 +143721,7 @@ var ts;
|
|
|
143644
143721
|
var startLine = parentStartLine;
|
|
143645
143722
|
if (listStartToken !== 0 /* Unknown */) {
|
|
143646
143723
|
// introduce a new indentation scope for lists (including list start and end tokens)
|
|
143647
|
-
while (formattingScanner.isOnToken()) {
|
|
143724
|
+
while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) {
|
|
143648
143725
|
var tokenInfo = formattingScanner.readTokenInfo(parent);
|
|
143649
143726
|
if (tokenInfo.token.end > nodes.pos) {
|
|
143650
143727
|
// stop when formatting scanner moves past the beginning of node list
|
|
@@ -143680,7 +143757,7 @@ var ts;
|
|
|
143680
143757
|
inheritedIndentation = processChildNode(child, inheritedIndentation, node, listDynamicIndentation, startLine, startLine, /*isListItem*/ true, /*isFirstListItem*/ i === 0);
|
|
143681
143758
|
}
|
|
143682
143759
|
var listEndToken = getCloseTokenForOpenToken(listStartToken);
|
|
143683
|
-
if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken()) {
|
|
143760
|
+
if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) {
|
|
143684
143761
|
var tokenInfo = formattingScanner.readTokenInfo(parent);
|
|
143685
143762
|
if (tokenInfo.token.kind === 27 /* CommaToken */ && ts.isCallLikeExpression(parent)) {
|
|
143686
143763
|
var commaTokenLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line;
|
|
@@ -143811,24 +143888,26 @@ var ts;
|
|
|
143811
143888
|
// win in a conflict with lower priority rules.
|
|
143812
143889
|
ts.forEachRight(rules, function (rule) {
|
|
143813
143890
|
lineAction = applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine);
|
|
143814
|
-
|
|
143815
|
-
|
|
143816
|
-
|
|
143817
|
-
|
|
143818
|
-
|
|
143819
|
-
|
|
143820
|
-
|
|
143821
|
-
|
|
143822
|
-
|
|
143823
|
-
|
|
143824
|
-
|
|
143825
|
-
|
|
143826
|
-
|
|
143827
|
-
|
|
143828
|
-
|
|
143829
|
-
|
|
143830
|
-
|
|
143831
|
-
|
|
143891
|
+
if (dynamicIndentation) {
|
|
143892
|
+
switch (lineAction) {
|
|
143893
|
+
case 2 /* LineRemoved */:
|
|
143894
|
+
// Handle the case where the next line is moved to be the end of this line.
|
|
143895
|
+
// In this case we don't indent the next line in the next pass.
|
|
143896
|
+
if (currentParent.getStart(sourceFile) === currentItem.pos) {
|
|
143897
|
+
dynamicIndentation.recomputeIndentation(/*lineAddedByFormatting*/ false, contextNode);
|
|
143898
|
+
}
|
|
143899
|
+
break;
|
|
143900
|
+
case 1 /* LineAdded */:
|
|
143901
|
+
// Handle the case where token2 is moved to the new line.
|
|
143902
|
+
// In this case we indent token2 in the next pass but we set
|
|
143903
|
+
// sameLineIndent flag to notify the indenter that the indentation is within the line.
|
|
143904
|
+
if (currentParent.getStart(sourceFile) === currentItem.pos) {
|
|
143905
|
+
dynamicIndentation.recomputeIndentation(/*lineAddedByFormatting*/ true, contextNode);
|
|
143906
|
+
}
|
|
143907
|
+
break;
|
|
143908
|
+
default:
|
|
143909
|
+
ts.Debug.assert(lineAction === 0 /* None */);
|
|
143910
|
+
}
|
|
143832
143911
|
}
|
|
143833
143912
|
// 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
|
|
143834
143913
|
trimTrailingWhitespaces = trimTrailingWhitespaces && !(rule.action & 16 /* DeleteSpace */) && rule.flags !== 1 /* CanDeleteNewLines */;
|
|
@@ -146306,7 +146385,7 @@ var ts;
|
|
|
146306
146385
|
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];
|
|
146307
146386
|
codefix.registerCodeFix({
|
|
146308
146387
|
errorCodes: errorCodes,
|
|
146309
|
-
getCodeActions: function (context) {
|
|
146388
|
+
getCodeActions: function getCodeActionsToAddConvertToUnknownForNonOverlappingTypes(context) {
|
|
146310
146389
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
|
|
146311
146390
|
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)];
|
|
146312
146391
|
},
|
|
@@ -146333,7 +146412,7 @@ var ts;
|
|
|
146333
146412
|
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,
|
|
146334
146413
|
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,
|
|
146335
146414
|
],
|
|
146336
|
-
getCodeActions: function (context) {
|
|
146415
|
+
getCodeActions: function getCodeActionsToAddEmptyExportDeclaration(context) {
|
|
146337
146416
|
var sourceFile = context.sourceFile;
|
|
146338
146417
|
var changes = ts.textChanges.ChangeTracker.with(context, function (changes) {
|
|
146339
146418
|
var exportDeclaration = ts.factory.createExportDeclaration(
|
|
@@ -146362,7 +146441,7 @@ var ts;
|
|
|
146362
146441
|
codefix.registerCodeFix({
|
|
146363
146442
|
fixIds: [fixId],
|
|
146364
146443
|
errorCodes: errorCodes,
|
|
146365
|
-
getCodeActions: function (context) {
|
|
146444
|
+
getCodeActions: function getCodeActionsToAddMissingAsync(context) {
|
|
146366
146445
|
var sourceFile = context.sourceFile, errorCode = context.errorCode, cancellationToken = context.cancellationToken, program = context.program, span = context.span;
|
|
146367
146446
|
var diagnostic = ts.find(program.getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile, cancellationToken), getIsMatchingAsyncError(span, errorCode));
|
|
146368
146447
|
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; });
|
|
@@ -146459,7 +146538,7 @@ var ts;
|
|
|
146459
146538
|
codefix.registerCodeFix({
|
|
146460
146539
|
fixIds: [fixId],
|
|
146461
146540
|
errorCodes: errorCodes,
|
|
146462
|
-
getCodeActions: function (context) {
|
|
146541
|
+
getCodeActions: function getCodeActionsToAddMissingAwait(context) {
|
|
146463
146542
|
var sourceFile = context.sourceFile, errorCode = context.errorCode, span = context.span, cancellationToken = context.cancellationToken, program = context.program;
|
|
146464
146543
|
var expression = getAwaitErrorSpanExpression(sourceFile, errorCode, span, cancellationToken, program);
|
|
146465
146544
|
if (!expression) {
|
|
@@ -146691,7 +146770,7 @@ var ts;
|
|
|
146691
146770
|
];
|
|
146692
146771
|
codefix.registerCodeFix({
|
|
146693
146772
|
errorCodes: errorCodes,
|
|
146694
|
-
getCodeActions: function (context) {
|
|
146773
|
+
getCodeActions: function getCodeActionsToAddMissingConst(context) {
|
|
146695
146774
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start, context.program); });
|
|
146696
146775
|
if (changes.length > 0) {
|
|
146697
146776
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_const_to_unresolved_variable, fixId, ts.Diagnostics.Add_const_to_all_unresolved_variables)];
|
|
@@ -146791,7 +146870,7 @@ var ts;
|
|
|
146791
146870
|
];
|
|
146792
146871
|
codefix.registerCodeFix({
|
|
146793
146872
|
errorCodes: errorCodes,
|
|
146794
|
-
getCodeActions: function (context) {
|
|
146873
|
+
getCodeActions: function getCodeActionsToAddMissingDeclareOnProperty(context) {
|
|
146795
146874
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
|
|
146796
146875
|
if (changes.length > 0) {
|
|
146797
146876
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Prefix_with_declare, fixId, ts.Diagnostics.Prefix_all_incorrect_property_declarations_with_declare)];
|
|
@@ -146825,7 +146904,7 @@ var ts;
|
|
|
146825
146904
|
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];
|
|
146826
146905
|
codefix.registerCodeFix({
|
|
146827
146906
|
errorCodes: errorCodes,
|
|
146828
|
-
getCodeActions: function (context) {
|
|
146907
|
+
getCodeActions: function getCodeActionsToAddMissingInvocationForDecorator(context) {
|
|
146829
146908
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
|
|
146830
146909
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Call_decorator_expression, fixId, ts.Diagnostics.Add_to_all_uncalled_decorators)];
|
|
146831
146910
|
},
|
|
@@ -146850,7 +146929,7 @@ var ts;
|
|
|
146850
146929
|
var errorCodes = [ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];
|
|
146851
146930
|
codefix.registerCodeFix({
|
|
146852
146931
|
errorCodes: errorCodes,
|
|
146853
|
-
getCodeActions: function (context) {
|
|
146932
|
+
getCodeActions: function getCodeActionsToAddNameToNamelessParameter(context) {
|
|
146854
146933
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
|
|
146855
146934
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_parameter_name, fixId, ts.Diagnostics.Add_names_to_all_parameters_without_names)];
|
|
146856
146935
|
},
|
|
@@ -148652,14 +148731,14 @@ var ts;
|
|
|
148652
148731
|
var fixId = "convertToTypeOnlyExport";
|
|
148653
148732
|
codefix.registerCodeFix({
|
|
148654
148733
|
errorCodes: errorCodes,
|
|
148655
|
-
getCodeActions: function (context) {
|
|
148734
|
+
getCodeActions: function getCodeActionsToConvertToTypeOnlyExport(context) {
|
|
148656
148735
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return fixSingleExportDeclaration(t, getExportSpecifierForDiagnosticSpan(context.span, context.sourceFile), context); });
|
|
148657
148736
|
if (changes.length) {
|
|
148658
148737
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Convert_to_type_only_export, fixId, ts.Diagnostics.Convert_all_re_exported_types_to_type_only_exports)];
|
|
148659
148738
|
}
|
|
148660
148739
|
},
|
|
148661
148740
|
fixIds: [fixId],
|
|
148662
|
-
getAllCodeActions: function (context) {
|
|
148741
|
+
getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyExport(context) {
|
|
148663
148742
|
var fixedExportDeclarations = new ts.Map();
|
|
148664
148743
|
return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
|
|
148665
148744
|
var exportSpecifier = getExportSpecifierForDiagnosticSpan(diag, context.sourceFile);
|
|
@@ -148720,7 +148799,7 @@ var ts;
|
|
|
148720
148799
|
var fixId = "convertToTypeOnlyImport";
|
|
148721
148800
|
codefix.registerCodeFix({
|
|
148722
148801
|
errorCodes: errorCodes,
|
|
148723
|
-
getCodeActions: function (context) {
|
|
148802
|
+
getCodeActions: function getCodeActionsToConvertToTypeOnlyImport(context) {
|
|
148724
148803
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) {
|
|
148725
148804
|
var importDeclaration = getImportDeclarationForDiagnosticSpan(context.span, context.sourceFile);
|
|
148726
148805
|
fixSingleImportDeclaration(t, importDeclaration, context);
|
|
@@ -148730,7 +148809,7 @@ var ts;
|
|
|
148730
148809
|
}
|
|
148731
148810
|
},
|
|
148732
148811
|
fixIds: [fixId],
|
|
148733
|
-
getAllCodeActions: function (context) {
|
|
148812
|
+
getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyImport(context) {
|
|
148734
148813
|
return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
|
|
148735
148814
|
var importDeclaration = getImportDeclarationForDiagnosticSpan(diag, context.sourceFile);
|
|
148736
148815
|
fixSingleImportDeclaration(changes, importDeclaration, context);
|
|
@@ -148769,7 +148848,7 @@ var ts;
|
|
|
148769
148848
|
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];
|
|
148770
148849
|
codefix.registerCodeFix({
|
|
148771
148850
|
errorCodes: errorCodes,
|
|
148772
|
-
getCodeActions: function (context) {
|
|
148851
|
+
getCodeActions: function getCodeActionsToConvertLiteralTypeToMappedType(context) {
|
|
148773
148852
|
var sourceFile = context.sourceFile, span = context.span;
|
|
148774
148853
|
var info = getInfo(sourceFile, span.start);
|
|
148775
148854
|
if (!info) {
|
|
@@ -149913,7 +149992,7 @@ var ts;
|
|
|
149913
149992
|
_a);
|
|
149914
149993
|
codefix.registerCodeFix({
|
|
149915
149994
|
errorCodes: errorCodes,
|
|
149916
|
-
getCodeActions: function (context) {
|
|
149995
|
+
getCodeActions: function getCodeActionsToFixOverrideModifierIssues(context) {
|
|
149917
149996
|
var errorCode = context.errorCode, span = context.span;
|
|
149918
149997
|
var info = errorCodeFixIdMap[errorCode];
|
|
149919
149998
|
if (!info)
|
|
@@ -150109,7 +150188,7 @@ var ts;
|
|
|
150109
150188
|
];
|
|
150110
150189
|
codefix.registerCodeFix({
|
|
150111
150190
|
errorCodes: errorCodes,
|
|
150112
|
-
getCodeActions: function (context) {
|
|
150191
|
+
getCodeActions: function getCodeActionsToFixIncorrectNamedTupleSyntax(context) {
|
|
150113
150192
|
var sourceFile = context.sourceFile, span = context.span;
|
|
150114
150193
|
var namedTupleMember = getNamedTupleMember(sourceFile, span.start);
|
|
150115
150194
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, namedTupleMember); });
|
|
@@ -150308,7 +150387,7 @@ var ts;
|
|
|
150308
150387
|
codefix.registerCodeFix({
|
|
150309
150388
|
errorCodes: errorCodes,
|
|
150310
150389
|
fixIds: [fixIdAddReturnStatement, fixRemoveBracesFromArrowFunctionBody, fixIdWrapTheBlockWithParen],
|
|
150311
|
-
getCodeActions: function (context) {
|
|
150390
|
+
getCodeActions: function getCodeActionsToCorrectReturnValue(context) {
|
|
150312
150391
|
var program = context.program, sourceFile = context.sourceFile, start = context.span.start, errorCode = context.errorCode;
|
|
150313
150392
|
var info = getInfo(program.getTypeChecker(), sourceFile, start, errorCode);
|
|
150314
150393
|
if (!info)
|
|
@@ -151058,7 +151137,7 @@ var ts;
|
|
|
151058
151137
|
];
|
|
151059
151138
|
codefix.registerCodeFix({
|
|
151060
151139
|
errorCodes: errorCodes,
|
|
151061
|
-
getCodeActions: function (context) {
|
|
151140
|
+
getCodeActions: function getCodeActionsToFixNotFoundModule(context) {
|
|
151062
151141
|
var host = context.host, sourceFile = context.sourceFile, start = context.span.start;
|
|
151063
151142
|
var packageName = tryGetImportedPackageName(sourceFile, start);
|
|
151064
151143
|
if (packageName === undefined)
|
|
@@ -151119,7 +151198,7 @@ var ts;
|
|
|
151119
151198
|
var fixId = "fixClassDoesntImplementInheritedAbstractMember";
|
|
151120
151199
|
codefix.registerCodeFix({
|
|
151121
151200
|
errorCodes: errorCodes,
|
|
151122
|
-
getCodeActions: function (context) {
|
|
151201
|
+
getCodeActions: function getCodeActionsToFixClassNotImplementingInheritedMembers(context) {
|
|
151123
151202
|
var sourceFile = context.sourceFile, span = context.span;
|
|
151124
151203
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) {
|
|
151125
151204
|
return addMissingMembers(getClass(sourceFile, span.start), sourceFile, context, t, context.preferences);
|
|
@@ -151127,7 +151206,7 @@ var ts;
|
|
|
151127
151206
|
return changes.length === 0 ? undefined : [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Implement_inherited_abstract_class, fixId, ts.Diagnostics.Implement_all_inherited_abstract_classes)];
|
|
151128
151207
|
},
|
|
151129
151208
|
fixIds: [fixId],
|
|
151130
|
-
getAllCodeActions: function (context) {
|
|
151209
|
+
getAllCodeActions: function getAllCodeActionsToFixClassDoesntImplementInheritedAbstractMember(context) {
|
|
151131
151210
|
var seenClassDeclarations = new ts.Map();
|
|
151132
151211
|
return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
|
|
151133
151212
|
var classDeclaration = getClass(diag.file, diag.start);
|
|
@@ -151260,7 +151339,7 @@ var ts;
|
|
|
151260
151339
|
];
|
|
151261
151340
|
codefix.registerCodeFix({
|
|
151262
151341
|
errorCodes: errorCodes,
|
|
151263
|
-
getCodeActions: function (context) {
|
|
151342
|
+
getCodeActions: function getCodeActionsToEnableExperimentalDecorators(context) {
|
|
151264
151343
|
var configFile = context.program.getCompilerOptions().configFile;
|
|
151265
151344
|
if (configFile === undefined) {
|
|
151266
151345
|
return undefined;
|
|
@@ -151291,7 +151370,7 @@ var ts;
|
|
|
151291
151370
|
var errorCodes = [ts.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];
|
|
151292
151371
|
codefix.registerCodeFix({
|
|
151293
151372
|
errorCodes: errorCodes,
|
|
151294
|
-
getCodeActions: function (context) {
|
|
151373
|
+
getCodeActions: function getCodeActionsToFixEnableJsxFlag(context) {
|
|
151295
151374
|
var configFile = context.program.getCompilerOptions().configFile;
|
|
151296
151375
|
if (configFile === undefined) {
|
|
151297
151376
|
return undefined;
|
|
@@ -151329,7 +151408,7 @@ var ts;
|
|
|
151329
151408
|
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,
|
|
151330
151409
|
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,
|
|
151331
151410
|
],
|
|
151332
|
-
getCodeActions: function (context) {
|
|
151411
|
+
getCodeActions: function getCodeActionsToFixModuleAndTarget(context) {
|
|
151333
151412
|
var compilerOptions = context.program.getCompilerOptions();
|
|
151334
151413
|
var configFile = compilerOptions.configFile;
|
|
151335
151414
|
if (configFile === undefined) {
|
|
@@ -152101,7 +152180,7 @@ var ts;
|
|
|
152101
152180
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_async_modifier_to_containing_function, fixId, ts.Diagnostics.Add_all_missing_async_modifiers)];
|
|
152102
152181
|
},
|
|
152103
152182
|
fixIds: [fixId],
|
|
152104
|
-
getAllCodeActions: function (context) {
|
|
152183
|
+
getAllCodeActions: function getAllCodeActionsToFixAwaitInSyncFunction(context) {
|
|
152105
152184
|
var seen = new ts.Map();
|
|
152106
152185
|
return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
|
|
152107
152186
|
var nodes = getNodes(diag.file, diag.start);
|
|
@@ -153223,7 +153302,7 @@ var ts;
|
|
|
153223
153302
|
codefix.registerCodeFix({
|
|
153224
153303
|
errorCodes: errorCodes,
|
|
153225
153304
|
fixIds: [fixId],
|
|
153226
|
-
getCodeActions: function (context) {
|
|
153305
|
+
getCodeActions: function getCodeActionsToFixReturnTypeInAsyncFunction(context) {
|
|
153227
153306
|
var sourceFile = context.sourceFile, program = context.program, span = context.span;
|
|
153228
153307
|
var checker = program.getTypeChecker();
|
|
153229
153308
|
var info = getInfo(sourceFile, program.getTypeChecker(), span.start);
|
|
@@ -153277,7 +153356,7 @@ var ts;
|
|
|
153277
153356
|
});
|
|
153278
153357
|
codefix.registerCodeFix({
|
|
153279
153358
|
errorCodes: errorCodes,
|
|
153280
|
-
getCodeActions: function (context) {
|
|
153359
|
+
getCodeActions: function getCodeActionsToDisableJsDiagnostics(context) {
|
|
153281
153360
|
var sourceFile = context.sourceFile, program = context.program, span = context.span, host = context.host, formatContext = context.formatContext;
|
|
153282
153361
|
if (!ts.isInJSFile(sourceFile) || !ts.isCheckJsEnabledForFile(sourceFile, program.getCompilerOptions())) {
|
|
153283
153362
|
return undefined;
|
|
@@ -154046,7 +154125,7 @@ var ts;
|
|
|
154046
154125
|
var errorCodes = [ts.Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];
|
|
154047
154126
|
codefix.registerCodeFix({
|
|
154048
154127
|
errorCodes: errorCodes,
|
|
154049
|
-
getCodeActions: function (context) {
|
|
154128
|
+
getCodeActions: function getCodeActionsForStrictClassInitializationErrors(context) {
|
|
154050
154129
|
var propertyDeclaration = getPropertyDeclaration(context.sourceFile, context.span.start);
|
|
154051
154130
|
if (!propertyDeclaration)
|
|
154052
154131
|
return;
|
|
@@ -154269,7 +154348,7 @@ var ts;
|
|
|
154269
154348
|
];
|
|
154270
154349
|
codefix.registerCodeFix({
|
|
154271
154350
|
errorCodes: errorCodes,
|
|
154272
|
-
getCodeActions: function (context) {
|
|
154351
|
+
getCodeActions: function getCodeActionsToUseBigintLiteral(context) {
|
|
154273
154352
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span); });
|
|
154274
154353
|
if (changes.length > 0) {
|
|
154275
154354
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Convert_to_a_bigint_numeric_literal, fixId, ts.Diagnostics.Convert_all_to_bigint_numeric_literals)];
|
|
@@ -154301,7 +154380,7 @@ var ts;
|
|
|
154301
154380
|
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];
|
|
154302
154381
|
codefix.registerCodeFix({
|
|
154303
154382
|
errorCodes: errorCodes,
|
|
154304
|
-
getCodeActions: function (context) {
|
|
154383
|
+
getCodeActions: function getCodeActionsToAddMissingTypeof(context) {
|
|
154305
154384
|
var sourceFile = context.sourceFile, span = context.span;
|
|
154306
154385
|
var importType = getImportTypeNode(sourceFile, span.start);
|
|
154307
154386
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, importType); });
|
|
@@ -154333,7 +154412,7 @@ var ts;
|
|
|
154333
154412
|
var errorCodes = [ts.Diagnostics.JSX_expressions_must_have_one_parent_element.code];
|
|
154334
154413
|
codefix.registerCodeFix({
|
|
154335
154414
|
errorCodes: errorCodes,
|
|
154336
|
-
getCodeActions: function (context) {
|
|
154415
|
+
getCodeActions: function getCodeActionsToWrapJsxInFragment(context) {
|
|
154337
154416
|
var sourceFile = context.sourceFile, span = context.span;
|
|
154338
154417
|
var node = findNodeToFix(sourceFile, span.start);
|
|
154339
154418
|
if (!node)
|
|
@@ -154405,12 +154484,11 @@ var ts;
|
|
|
154405
154484
|
(function (ts) {
|
|
154406
154485
|
var codefix;
|
|
154407
154486
|
(function (codefix) {
|
|
154408
|
-
var
|
|
154409
|
-
var fixId = fixIdAddMissingTypeof;
|
|
154487
|
+
var fixId = "fixConvertToMappedObjectType";
|
|
154410
154488
|
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];
|
|
154411
154489
|
codefix.registerCodeFix({
|
|
154412
154490
|
errorCodes: errorCodes,
|
|
154413
|
-
getCodeActions: function (context) {
|
|
154491
|
+
getCodeActions: function getCodeActionsToConvertToMappedTypeObject(context) {
|
|
154414
154492
|
var sourceFile = context.sourceFile, span = context.span;
|
|
154415
154493
|
var info = getInfo(sourceFile, span.start);
|
|
154416
154494
|
if (!info)
|
|
@@ -154489,7 +154567,7 @@ var ts;
|
|
|
154489
154567
|
];
|
|
154490
154568
|
codefix.registerCodeFix({
|
|
154491
154569
|
errorCodes: errorCodes,
|
|
154492
|
-
getCodeActions: function (context) {
|
|
154570
|
+
getCodeActions: function getCodeActionsToRemoveUnnecessaryAwait(context) {
|
|
154493
154571
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span); });
|
|
154494
154572
|
if (changes.length > 0) {
|
|
154495
154573
|
return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Remove_unnecessary_await, fixId, ts.Diagnostics.Remove_all_unnecessary_uses_of_await)];
|
|
@@ -154531,7 +154609,7 @@ var ts;
|
|
|
154531
154609
|
codefix.registerCodeFix({
|
|
154532
154610
|
errorCodes: errorCodes,
|
|
154533
154611
|
fixIds: [fixId],
|
|
154534
|
-
getCodeActions: function (context) {
|
|
154612
|
+
getCodeActions: function getCodeActionsToSplitTypeOnlyImport(context) {
|
|
154535
154613
|
var changes = ts.textChanges.ChangeTracker.with(context, function (t) {
|
|
154536
154614
|
return splitTypeOnlyImport(t, getImportDeclaration(context.sourceFile, context.span), context);
|
|
154537
154615
|
});
|
|
@@ -154567,7 +154645,7 @@ var ts;
|
|
|
154567
154645
|
var errorCodes = [ts.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];
|
|
154568
154646
|
codefix.registerCodeFix({
|
|
154569
154647
|
errorCodes: errorCodes,
|
|
154570
|
-
getCodeActions: function (context) {
|
|
154648
|
+
getCodeActions: function getCodeActionsToConvertConstToLet(context) {
|
|
154571
154649
|
var sourceFile = context.sourceFile, span = context.span, program = context.program;
|
|
154572
154650
|
var range = getConstTokenRange(sourceFile, span.start, program);
|
|
154573
154651
|
if (range === undefined)
|