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.
@@ -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.20211126";
297
+ ts.version = ts.versionMajorMinor + ".0-dev.20211203";
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 = { name: "compileOnSave", type: "boolean", defaultValueDescription: "false" };
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: "false",
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: "false",
38392
+ defaultValueDescription: false,
38385
38393
  },
38386
38394
  {
38387
38395
  name: "help",
38388
38396
  shortName: "?",
38389
38397
  type: "boolean",
38390
- defaultValueDescription: "false",
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: "false",
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: "false",
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: "false"
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: "false",
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: "false"
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: "true"
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: "false"
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: "false"
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: "false"
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: "false",
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: "ES3"
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: "false",
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: "false",
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: "false",
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: "false",
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: "false",
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: "false",
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: "false"
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: "false"
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: "undefined"
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: "false",
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: "false",
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: "false",
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: "false",
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: "false",
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: "false"
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: "false"
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: "false"
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: "false"
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: "false"
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: "false",
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: "false"
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: "false"
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: "false",
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: "false"
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: "false",
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: "false",
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: "false",
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: "false"
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: "false"
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: "false",
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: "false"
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: "false"
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: "false"
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: "false",
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: "false",
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: "false"
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: "false",
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: "false"
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: "false"
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: "false"
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: "false"
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: "false",
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: "false"
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: "false",
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: "false",
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: "false",
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: "false"
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: "false"
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: "false"
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: "false",
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: "false"
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: "undefined"
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: "undefined"
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: "false"
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: "false"
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: "false"
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: "0"
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: "false"
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: "false",
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: "false"
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: "false",
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: "false",
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: "false",
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: "false",
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: "false",
39492
+ defaultValueDescription: false,
39482
39493
  },
39483
39494
  {
39484
39495
  name: "enable",
39485
39496
  type: "boolean",
39486
- defaultValueDescription: "false",
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: "false",
39518
+ defaultValueDescription: false,
39508
39519
  },
39509
39520
  ];
39510
39521
  /*@internal*/
@@ -86817,18 +86828,22 @@ var ts;
86817
86828
  return false;
86818
86829
  }
86819
86830
  function checkNumericLiteralValueSize(node) {
86831
+ // We should test against `getTextOfNode(node)` rather than `node.text`, because `node.text` for large numeric literals can contain "."
86832
+ // e.g. `node.text` for numeric literal `1100000000000000000000` is `1.1e21`.
86833
+ var isFractional = ts.getTextOfNode(node).indexOf(".") !== -1;
86834
+ var isScientific = node.numericLiteralFlags & 16 /* Scientific */;
86820
86835
  // Scientific notation (e.g. 2e54 and 1e00000000010) can't be converted to bigint
86821
- // Literals with 15 or fewer characters aren't long enough to reach past 2^53 - 1
86822
86836
  // Fractional numbers (e.g. 9000000000000000.001) are inherently imprecise anyway
86823
- if (node.numericLiteralFlags & 16 /* Scientific */ || node.text.length <= 15 || node.text.indexOf(".") !== -1) {
86837
+ if (isFractional || isScientific) {
86824
86838
  return;
86825
86839
  }
86826
- // We can't rely on the runtime to accurately store and compare extremely large numeric values
86827
- // Even for internal use, we use getTextOfNode: https://github.com/microsoft/TypeScript/issues/33298
86828
- // Thus, if the runtime claims a too-large number is lower than Number.MAX_SAFE_INTEGER,
86829
- // it's likely addition operations on it will fail too
86830
- var apparentValue = +ts.getTextOfNode(node);
86831
- if (apparentValue <= Math.pow(2, 53) - 1 && apparentValue + 1 > apparentValue) {
86840
+ // Here `node` is guaranteed to be a numeric literal representing an integer.
86841
+ // We need to judge whether the integer `node` represents is <= 2 ** 53 - 1, which can be accomplished by comparing to `value` defined below because:
86842
+ // 1) when `node` represents an integer <= 2 ** 53 - 1, `node.text` is its exact string representation and thus `value` precisely represents the integer.
86843
+ // 2) otherwise, although `node.text` may be imprecise string representation, its mathematical value and consequently `value` cannot be less than 2 ** 53,
86844
+ // thus the result of the predicate won't be affected.
86845
+ var value = +node.text;
86846
+ if (value <= Math.pow(2, 53) - 1) {
86832
86847
  return;
86833
86848
  }
86834
86849
  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));
@@ -90290,7 +90305,7 @@ var ts;
90290
90305
  // ], C.prototype, "prop");
90291
90306
  //
90292
90307
  var prefix = getClassMemberPrefix(node, member);
90293
- var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ true);
90308
+ var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ !ts.hasSyntacticModifier(member, 2 /* Ambient */));
90294
90309
  var descriptor = languageVersion > 0 /* ES3 */
90295
90310
  ? member.kind === 166 /* PropertyDeclaration */
90296
90311
  // We emit `void 0` here to indicate to `__decorate` that it can invoke `Object.defineProperty` directly, but that it
@@ -91104,11 +91119,10 @@ var ts;
91104
91119
  // we can safely elide the parentheses here, as a new synthetic
91105
91120
  // ParenthesizedExpression will be inserted if we remove parentheses too
91106
91121
  // aggressively.
91107
- // HOWEVER - if there are leading comments on the expression itself, to handle ASI
91108
- // correctly for return and throw, we must keep the parenthesis
91109
- if (ts.length(ts.getLeadingCommentRangesOfNode(expression, currentSourceFile))) {
91110
- return factory.updateParenthesizedExpression(node, expression);
91111
- }
91122
+ //
91123
+ // If there are leading comments on the expression itself, the emitter will handle ASI
91124
+ // for return, throw, and yield by re-introducing parenthesis during emit on an as-need
91125
+ // basis.
91112
91126
  return factory.createPartiallyEmittedExpression(expression, node);
91113
91127
  }
91114
91128
  return ts.visitEachChild(node, visitor, context);
@@ -95056,11 +95070,11 @@ var ts;
95056
95070
  }
95057
95071
  function visitOptionalExpression(node, captureThisArg, isDelete) {
95058
95072
  var _a = flattenChain(node), expression = _a.expression, chain = _a.chain;
95059
- var left = visitNonOptionalExpression(expression, ts.isCallChain(chain[0]), /*isDelete*/ false);
95073
+ var left = visitNonOptionalExpression(ts.skipPartiallyEmittedExpressions(expression), ts.isCallChain(chain[0]), /*isDelete*/ false);
95060
95074
  var leftThisArg = ts.isSyntheticReference(left) ? left.thisArg : undefined;
95061
- var leftExpression = ts.isSyntheticReference(left) ? left.expression : left;
95062
- var capturedLeft = leftExpression;
95063
- if (!ts.isSimpleCopiableExpression(leftExpression)) {
95075
+ var capturedLeft = ts.isSyntheticReference(left) ? left.expression : left;
95076
+ var leftExpression = factory.restoreOuterExpressions(expression, capturedLeft, 8 /* PartiallyEmittedExpressions */);
95077
+ if (!ts.isSimpleCopiableExpression(capturedLeft)) {
95064
95078
  capturedLeft = factory.createTempVariable(hoistVariableDeclaration);
95065
95079
  leftExpression = factory.createAssignment(capturedLeft, leftExpression);
95066
95080
  }
@@ -95086,6 +95100,10 @@ var ts;
95086
95100
  break;
95087
95101
  case 207 /* CallExpression */:
95088
95102
  if (i === 0 && leftThisArg) {
95103
+ if (!ts.isGeneratedIdentifier(leftThisArg)) {
95104
+ leftThisArg = factory.cloneNode(leftThisArg);
95105
+ ts.addEmitFlags(leftThisArg, 1536 /* NoComments */);
95106
+ }
95089
95107
  rightExpression = factory.createFunctionCallCall(rightExpression, leftThisArg.kind === 106 /* SuperKeyword */ ? factory.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression));
95090
95108
  }
95091
95109
  else {
@@ -109868,7 +109886,7 @@ var ts;
109868
109886
  function emitYieldExpression(node) {
109869
109887
  emitTokenWithComment(125 /* YieldKeyword */, node.pos, writeKeyword, node);
109870
109888
  emit(node.asteriskToken);
109871
- emitExpressionWithLeadingSpace(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma);
109889
+ emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsiAndDisallowedComma);
109872
109890
  }
109873
109891
  function emitSpreadElement(node) {
109874
109892
  emitTokenWithComment(25 /* DotDotDotToken */, node.pos, writePunctuation, node);
@@ -110065,9 +110083,49 @@ var ts;
110065
110083
  }
110066
110084
  return pos;
110067
110085
  }
110086
+ function commentWillEmitNewLine(node) {
110087
+ return node.kind === 2 /* SingleLineCommentTrivia */ || !!node.hasTrailingNewLine;
110088
+ }
110089
+ function willEmitLeadingNewLine(node) {
110090
+ if (!currentSourceFile)
110091
+ return false;
110092
+ if (ts.some(ts.getLeadingCommentRanges(currentSourceFile.text, node.pos), commentWillEmitNewLine))
110093
+ return true;
110094
+ if (ts.some(ts.getSyntheticLeadingComments(node), commentWillEmitNewLine))
110095
+ return true;
110096
+ if (ts.isPartiallyEmittedExpression(node)) {
110097
+ if (node.pos !== node.expression.pos) {
110098
+ if (ts.some(ts.getTrailingCommentRanges(currentSourceFile.text, node.expression.pos), commentWillEmitNewLine))
110099
+ return true;
110100
+ }
110101
+ return willEmitLeadingNewLine(node.expression);
110102
+ }
110103
+ return false;
110104
+ }
110105
+ /**
110106
+ * Wraps an expression in parens if we would emit a leading comment that would introduce a line separator
110107
+ * between the node and its parent.
110108
+ */
110109
+ function parenthesizeExpressionForNoAsi(node) {
110110
+ if (!commentsDisabled && ts.isPartiallyEmittedExpression(node) && willEmitLeadingNewLine(node)) {
110111
+ var parseNode = ts.getParseTreeNode(node);
110112
+ if (parseNode && ts.isParenthesizedExpression(parseNode)) {
110113
+ // If the original node was a parenthesized expression, restore it to preserve comment and source map emit
110114
+ var parens = ts.factory.createParenthesizedExpression(node.expression);
110115
+ ts.setOriginalNode(parens, node);
110116
+ ts.setTextRange(parens, parseNode);
110117
+ return parens;
110118
+ }
110119
+ return ts.factory.createParenthesizedExpression(node);
110120
+ }
110121
+ return node;
110122
+ }
110123
+ function parenthesizeExpressionForNoAsiAndDisallowedComma(node) {
110124
+ return parenthesizeExpressionForNoAsi(parenthesizer.parenthesizeExpressionForDisallowedComma(node));
110125
+ }
110068
110126
  function emitReturnStatement(node) {
110069
110127
  emitTokenWithComment(105 /* ReturnKeyword */, node.pos, writeKeyword, /*contextNode*/ node);
110070
- emitExpressionWithLeadingSpace(node.expression);
110128
+ emitExpressionWithLeadingSpace(node.expression && parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi);
110071
110129
  writeTrailingSemicolon();
110072
110130
  }
110073
110131
  function emitWithStatement(node) {
@@ -110095,7 +110153,7 @@ var ts;
110095
110153
  }
110096
110154
  function emitThrowStatement(node) {
110097
110155
  emitTokenWithComment(109 /* ThrowKeyword */, node.pos, writeKeyword, node);
110098
- emitExpressionWithLeadingSpace(node.expression);
110156
+ emitExpressionWithLeadingSpace(parenthesizeExpressionForNoAsi(node.expression), parenthesizeExpressionForNoAsi);
110099
110157
  writeTrailingSemicolon();
110100
110158
  }
110101
110159
  function emitTryStatement(node) {
@@ -110939,7 +110997,14 @@ var ts;
110939
110997
  }
110940
110998
  // Transformation nodes
110941
110999
  function emitPartiallyEmittedExpression(node) {
111000
+ var emitFlags = ts.getEmitFlags(node);
111001
+ if (!(emitFlags & 512 /* NoLeadingComments */) && node.pos !== node.expression.pos) {
111002
+ emitTrailingCommentsOfPosition(node.expression.pos);
111003
+ }
110942
111004
  emitExpression(node.expression);
111005
+ if (!(emitFlags & 1024 /* NoTrailingComments */) && node.end !== node.expression.end) {
111006
+ emitLeadingCommentsOfPosition(node.expression.end);
111007
+ }
110943
111008
  }
110944
111009
  function emitCommaList(node) {
110945
111010
  emitExpressionList(node, node.elements, 528 /* CommaListElements */, /*parenthesizerRule*/ undefined);
@@ -111303,10 +111368,8 @@ var ts;
111303
111368
  // Emit this child.
111304
111369
  previousSourceFileTextKind = recordBundleFileInternalSectionStart(child);
111305
111370
  if (shouldEmitInterveningComments) {
111306
- if (emitTrailingCommentsOfPosition) {
111307
- var commentRange = ts.getCommentRange(child);
111308
- emitTrailingCommentsOfPosition(commentRange.pos);
111309
- }
111371
+ var commentRange = ts.getCommentRange(child);
111372
+ emitTrailingCommentsOfPosition(commentRange.pos);
111310
111373
  }
111311
111374
  else {
111312
111375
  shouldEmitInterveningComments = mayEmitInterveningComments;
@@ -111627,7 +111690,7 @@ var ts;
111627
111690
  function writeLineSeparatorsAndIndentBefore(node, parent) {
111628
111691
  var leadingNewlines = preserveSourceNewlines && getLeadingLineTerminatorCount(parent, [node], 0 /* None */);
111629
111692
  if (leadingNewlines) {
111630
- writeLinesAndIndent(leadingNewlines, /*writeLinesIfNotIndenting*/ false);
111693
+ writeLinesAndIndent(leadingNewlines, /*writeSpaceIfNotIndenting*/ false);
111631
111694
  }
111632
111695
  return !!leadingNewlines;
111633
111696
  }
@@ -126005,7 +126068,6 @@ var ts;
126005
126068
  || kind === 165 /* PropertySignature */
126006
126069
  || kind === 167 /* MethodSignature */;
126007
126070
  }
126008
- ts.syntaxRequiresTrailingCommaOrSemicolonOrASI = syntaxRequiresTrailingCommaOrSemicolonOrASI;
126009
126071
  function syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI(kind) {
126010
126072
  return kind === 255 /* FunctionDeclaration */
126011
126073
  || kind === 170 /* Constructor */
@@ -126013,11 +126075,9 @@ var ts;
126013
126075
  || kind === 171 /* GetAccessor */
126014
126076
  || kind === 172 /* SetAccessor */;
126015
126077
  }
126016
- ts.syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI = syntaxRequiresTrailingFunctionBlockOrSemicolonOrASI;
126017
126078
  function syntaxRequiresTrailingModuleBlockOrSemicolonOrASI(kind) {
126018
126079
  return kind === 260 /* ModuleDeclaration */;
126019
126080
  }
126020
- ts.syntaxRequiresTrailingModuleBlockOrSemicolonOrASI = syntaxRequiresTrailingModuleBlockOrSemicolonOrASI;
126021
126081
  function syntaxRequiresTrailingSemicolonOrASI(kind) {
126022
126082
  return kind === 236 /* VariableStatement */
126023
126083
  || kind === 237 /* ExpressionStatement */
@@ -126092,19 +126152,34 @@ var ts;
126092
126152
  ts.forEachChild(sourceFile, function visit(node) {
126093
126153
  if (syntaxRequiresTrailingSemicolonOrASI(node.kind)) {
126094
126154
  var lastToken = node.getLastToken(sourceFile);
126095
- if (lastToken && lastToken.kind === 26 /* SemicolonToken */) {
126155
+ if ((lastToken === null || lastToken === void 0 ? void 0 : lastToken.kind) === 26 /* SemicolonToken */) {
126096
126156
  withSemicolon++;
126097
126157
  }
126098
126158
  else {
126099
126159
  withoutSemicolon++;
126100
126160
  }
126101
126161
  }
126162
+ else if (syntaxRequiresTrailingCommaOrSemicolonOrASI(node.kind)) {
126163
+ var lastToken = node.getLastToken(sourceFile);
126164
+ if ((lastToken === null || lastToken === void 0 ? void 0 : lastToken.kind) === 26 /* SemicolonToken */) {
126165
+ withSemicolon++;
126166
+ }
126167
+ else if (lastToken && lastToken.kind !== 27 /* CommaToken */) {
126168
+ var lastTokenLine = ts.getLineAndCharacterOfPosition(sourceFile, lastToken.getStart(sourceFile)).line;
126169
+ var nextTokenLine = ts.getLineAndCharacterOfPosition(sourceFile, ts.getSpanOfTokenAtPosition(sourceFile, lastToken.end).start).line;
126170
+ // Avoid counting missing semicolon in single-line objects:
126171
+ // `function f(p: { x: string /*no semicolon here is insignificant*/ }) {`
126172
+ if (lastTokenLine !== nextTokenLine) {
126173
+ withoutSemicolon++;
126174
+ }
126175
+ }
126176
+ }
126102
126177
  if (withSemicolon + withoutSemicolon >= nStatementsToObserve) {
126103
126178
  return true;
126104
126179
  }
126105
126180
  return ts.forEachChild(node, visit);
126106
126181
  });
126107
- // One statement missing a semicolon isn’t sufficient evidence to say the user
126182
+ // One statement missing a semicolon isn't sufficient evidence to say the user
126108
126183
  // doesn’t want semicolons, because they may not even be done writing that statement.
126109
126184
  if (withSemicolon === 0 && withoutSemicolon <= 1) {
126110
126185
  return true;
@@ -141970,6 +142045,7 @@ var ts;
141970
142045
  lastTrailingTriviaWasNewLine: function () { return wasNewLine; },
141971
142046
  skipToEndOf: skipToEndOf,
141972
142047
  skipToStartOf: skipToStartOf,
142048
+ getStartPos: function () { var _a; return (_a = lastTokenInfo === null || lastTokenInfo === void 0 ? void 0 : lastTokenInfo.token.pos) !== null && _a !== void 0 ? _a : scanner.getTokenPos(); },
141973
142049
  });
141974
142050
  lastTokenInfo = undefined;
141975
142051
  scanner.setText(undefined);
@@ -142143,8 +142219,7 @@ var ts;
142143
142219
  }
142144
142220
  function isOnToken() {
142145
142221
  var current = lastTokenInfo ? lastTokenInfo.token.kind : scanner.getToken();
142146
- var startPos = lastTokenInfo ? lastTokenInfo.token.pos : scanner.getStartPos();
142147
- return startPos < endPos && current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current);
142222
+ return current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current);
142148
142223
  }
142149
142224
  function isOnEOF() {
142150
142225
  var current = lastTokenInfo ? lastTokenInfo.token.kind : scanner.getToken();
@@ -143332,7 +143407,7 @@ var ts;
143332
143407
  return 0;
143333
143408
  }
143334
143409
  function formatNodeGivenIndentation(node, sourceFileLike, languageVariant, initialIndentation, delta, formatContext) {
143335
- var range = { pos: 0, end: sourceFileLike.text.length };
143410
+ var range = { pos: node.pos, end: node.end };
143336
143411
  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
143412
  sourceFileLike); });
143338
143413
  }
@@ -143383,6 +143458,15 @@ var ts;
143383
143458
  }
143384
143459
  }
143385
143460
  }
143461
+ if (previousRange && formattingScanner.getStartPos() >= originalRange.end) {
143462
+ var token = formattingScanner.isOnEOF() ? formattingScanner.readEOFTokenRange() :
143463
+ formattingScanner.isOnToken() ? formattingScanner.readTokenInfo(enclosingNode).token :
143464
+ undefined;
143465
+ if (token) {
143466
+ processPair(token, sourceFile.getLineAndCharacterOfPosition(token.pos).line, enclosingNode, previousRange, previousRangeStartLine, previousParent, enclosingNode,
143467
+ /*dynamicIndentation*/ undefined);
143468
+ }
143469
+ }
143386
143470
  return edits;
143387
143471
  // local functions
143388
143472
  /** Tries to compute the indentation for a list element.
@@ -143565,19 +143649,13 @@ var ts;
143565
143649
  processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation);
143566
143650
  });
143567
143651
  // proceed any tokens in the node that are located after child nodes
143568
- while (formattingScanner.isOnToken()) {
143652
+ while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) {
143569
143653
  var tokenInfo = formattingScanner.readTokenInfo(node);
143570
- if (tokenInfo.token.end > node.end) {
143654
+ if (tokenInfo.token.end > Math.min(node.end, originalRange.end)) {
143571
143655
  break;
143572
143656
  }
143573
143657
  consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation, node);
143574
143658
  }
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
143659
  function processChildNode(child, inheritedIndentation, parent, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) {
143582
143660
  var childStartPos = child.getStart(sourceFile);
143583
143661
  var childStartLine = sourceFile.getLineAndCharacterOfPosition(childStartPos).line;
@@ -143603,9 +143681,12 @@ var ts;
143603
143681
  if (child.getFullWidth() === 0) {
143604
143682
  return inheritedIndentation;
143605
143683
  }
143606
- while (formattingScanner.isOnToken()) {
143684
+ while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) {
143607
143685
  // proceed any parent tokens that are located prior to child.getStart()
143608
143686
  var tokenInfo = formattingScanner.readTokenInfo(node);
143687
+ if (tokenInfo.token.end > originalRange.end) {
143688
+ return inheritedIndentation;
143689
+ }
143609
143690
  if (tokenInfo.token.end > childStartPos) {
143610
143691
  if (tokenInfo.token.pos > childStartPos) {
143611
143692
  formattingScanner.skipToStartOf(child);
@@ -143615,7 +143696,7 @@ var ts;
143615
143696
  }
143616
143697
  consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, node);
143617
143698
  }
143618
- if (!formattingScanner.isOnToken()) {
143699
+ if (!formattingScanner.isOnToken() || formattingScanner.getStartPos() >= originalRange.end) {
143619
143700
  return inheritedIndentation;
143620
143701
  }
143621
143702
  if (ts.isToken(child)) {
@@ -143644,7 +143725,7 @@ var ts;
143644
143725
  var startLine = parentStartLine;
143645
143726
  if (listStartToken !== 0 /* Unknown */) {
143646
143727
  // introduce a new indentation scope for lists (including list start and end tokens)
143647
- while (formattingScanner.isOnToken()) {
143728
+ while (formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) {
143648
143729
  var tokenInfo = formattingScanner.readTokenInfo(parent);
143649
143730
  if (tokenInfo.token.end > nodes.pos) {
143650
143731
  // stop when formatting scanner moves past the beginning of node list
@@ -143680,7 +143761,7 @@ var ts;
143680
143761
  inheritedIndentation = processChildNode(child, inheritedIndentation, node, listDynamicIndentation, startLine, startLine, /*isListItem*/ true, /*isFirstListItem*/ i === 0);
143681
143762
  }
143682
143763
  var listEndToken = getCloseTokenForOpenToken(listStartToken);
143683
- if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken()) {
143764
+ if (listEndToken !== 0 /* Unknown */ && formattingScanner.isOnToken() && formattingScanner.getStartPos() < originalRange.end) {
143684
143765
  var tokenInfo = formattingScanner.readTokenInfo(parent);
143685
143766
  if (tokenInfo.token.kind === 27 /* CommaToken */ && ts.isCallLikeExpression(parent)) {
143686
143767
  var commaTokenLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line;
@@ -143811,24 +143892,26 @@ var ts;
143811
143892
  // win in a conflict with lower priority rules.
143812
143893
  ts.forEachRight(rules, function (rule) {
143813
143894
  lineAction = applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine);
143814
- switch (lineAction) {
143815
- case 2 /* LineRemoved */:
143816
- // Handle the case where the next line is moved to be the end of this line.
143817
- // In this case we don't indent the next line in the next pass.
143818
- if (currentParent.getStart(sourceFile) === currentItem.pos) {
143819
- dynamicIndentation.recomputeIndentation(/*lineAddedByFormatting*/ false, contextNode);
143820
- }
143821
- break;
143822
- case 1 /* LineAdded */:
143823
- // Handle the case where token2 is moved to the new line.
143824
- // In this case we indent token2 in the next pass but we set
143825
- // sameLineIndent flag to notify the indenter that the indentation is within the line.
143826
- if (currentParent.getStart(sourceFile) === currentItem.pos) {
143827
- dynamicIndentation.recomputeIndentation(/*lineAddedByFormatting*/ true, contextNode);
143828
- }
143829
- break;
143830
- default:
143831
- ts.Debug.assert(lineAction === 0 /* None */);
143895
+ if (dynamicIndentation) {
143896
+ switch (lineAction) {
143897
+ case 2 /* LineRemoved */:
143898
+ // Handle the case where the next line is moved to be the end of this line.
143899
+ // In this case we don't indent the next line in the next pass.
143900
+ if (currentParent.getStart(sourceFile) === currentItem.pos) {
143901
+ dynamicIndentation.recomputeIndentation(/*lineAddedByFormatting*/ false, contextNode);
143902
+ }
143903
+ break;
143904
+ case 1 /* LineAdded */:
143905
+ // Handle the case where token2 is moved to the new line.
143906
+ // In this case we indent token2 in the next pass but we set
143907
+ // sameLineIndent flag to notify the indenter that the indentation is within the line.
143908
+ if (currentParent.getStart(sourceFile) === currentItem.pos) {
143909
+ dynamicIndentation.recomputeIndentation(/*lineAddedByFormatting*/ true, contextNode);
143910
+ }
143911
+ break;
143912
+ default:
143913
+ ts.Debug.assert(lineAction === 0 /* None */);
143914
+ }
143832
143915
  }
143833
143916
  // 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
143917
  trimTrailingWhitespaces = trimTrailingWhitespaces && !(rule.action & 16 /* DeleteSpace */) && rule.flags !== 1 /* CanDeleteNewLines */;
@@ -146306,7 +146389,7 @@ var ts;
146306
146389
  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
146390
  codefix.registerCodeFix({
146308
146391
  errorCodes: errorCodes,
146309
- getCodeActions: function (context) {
146392
+ getCodeActions: function getCodeActionsToAddConvertToUnknownForNonOverlappingTypes(context) {
146310
146393
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
146311
146394
  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
146395
  },
@@ -146333,7 +146416,7 @@ var ts;
146333
146416
  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
146417
  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
146418
  ],
146336
- getCodeActions: function (context) {
146419
+ getCodeActions: function getCodeActionsToAddEmptyExportDeclaration(context) {
146337
146420
  var sourceFile = context.sourceFile;
146338
146421
  var changes = ts.textChanges.ChangeTracker.with(context, function (changes) {
146339
146422
  var exportDeclaration = ts.factory.createExportDeclaration(
@@ -146362,7 +146445,7 @@ var ts;
146362
146445
  codefix.registerCodeFix({
146363
146446
  fixIds: [fixId],
146364
146447
  errorCodes: errorCodes,
146365
- getCodeActions: function (context) {
146448
+ getCodeActions: function getCodeActionsToAddMissingAsync(context) {
146366
146449
  var sourceFile = context.sourceFile, errorCode = context.errorCode, cancellationToken = context.cancellationToken, program = context.program, span = context.span;
146367
146450
  var diagnostic = ts.find(program.getDiagnosticsProducingTypeChecker().getDiagnostics(sourceFile, cancellationToken), getIsMatchingAsyncError(span, errorCode));
146368
146451
  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 +146542,7 @@ var ts;
146459
146542
  codefix.registerCodeFix({
146460
146543
  fixIds: [fixId],
146461
146544
  errorCodes: errorCodes,
146462
- getCodeActions: function (context) {
146545
+ getCodeActions: function getCodeActionsToAddMissingAwait(context) {
146463
146546
  var sourceFile = context.sourceFile, errorCode = context.errorCode, span = context.span, cancellationToken = context.cancellationToken, program = context.program;
146464
146547
  var expression = getAwaitErrorSpanExpression(sourceFile, errorCode, span, cancellationToken, program);
146465
146548
  if (!expression) {
@@ -146691,7 +146774,7 @@ var ts;
146691
146774
  ];
146692
146775
  codefix.registerCodeFix({
146693
146776
  errorCodes: errorCodes,
146694
- getCodeActions: function (context) {
146777
+ getCodeActions: function getCodeActionsToAddMissingConst(context) {
146695
146778
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start, context.program); });
146696
146779
  if (changes.length > 0) {
146697
146780
  return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_const_to_unresolved_variable, fixId, ts.Diagnostics.Add_const_to_all_unresolved_variables)];
@@ -146791,7 +146874,7 @@ var ts;
146791
146874
  ];
146792
146875
  codefix.registerCodeFix({
146793
146876
  errorCodes: errorCodes,
146794
- getCodeActions: function (context) {
146877
+ getCodeActions: function getCodeActionsToAddMissingDeclareOnProperty(context) {
146795
146878
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
146796
146879
  if (changes.length > 0) {
146797
146880
  return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Prefix_with_declare, fixId, ts.Diagnostics.Prefix_all_incorrect_property_declarations_with_declare)];
@@ -146825,7 +146908,7 @@ var ts;
146825
146908
  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
146909
  codefix.registerCodeFix({
146827
146910
  errorCodes: errorCodes,
146828
- getCodeActions: function (context) {
146911
+ getCodeActions: function getCodeActionsToAddMissingInvocationForDecorator(context) {
146829
146912
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
146830
146913
  return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Call_decorator_expression, fixId, ts.Diagnostics.Add_to_all_uncalled_decorators)];
146831
146914
  },
@@ -146850,7 +146933,7 @@ var ts;
146850
146933
  var errorCodes = [ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];
146851
146934
  codefix.registerCodeFix({
146852
146935
  errorCodes: errorCodes,
146853
- getCodeActions: function (context) {
146936
+ getCodeActions: function getCodeActionsToAddNameToNamelessParameter(context) {
146854
146937
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span.start); });
146855
146938
  return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_parameter_name, fixId, ts.Diagnostics.Add_names_to_all_parameters_without_names)];
146856
146939
  },
@@ -148652,14 +148735,14 @@ var ts;
148652
148735
  var fixId = "convertToTypeOnlyExport";
148653
148736
  codefix.registerCodeFix({
148654
148737
  errorCodes: errorCodes,
148655
- getCodeActions: function (context) {
148738
+ getCodeActions: function getCodeActionsToConvertToTypeOnlyExport(context) {
148656
148739
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return fixSingleExportDeclaration(t, getExportSpecifierForDiagnosticSpan(context.span, context.sourceFile), context); });
148657
148740
  if (changes.length) {
148658
148741
  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
148742
  }
148660
148743
  },
148661
148744
  fixIds: [fixId],
148662
- getAllCodeActions: function (context) {
148745
+ getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyExport(context) {
148663
148746
  var fixedExportDeclarations = new ts.Map();
148664
148747
  return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
148665
148748
  var exportSpecifier = getExportSpecifierForDiagnosticSpan(diag, context.sourceFile);
@@ -148720,7 +148803,7 @@ var ts;
148720
148803
  var fixId = "convertToTypeOnlyImport";
148721
148804
  codefix.registerCodeFix({
148722
148805
  errorCodes: errorCodes,
148723
- getCodeActions: function (context) {
148806
+ getCodeActions: function getCodeActionsToConvertToTypeOnlyImport(context) {
148724
148807
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) {
148725
148808
  var importDeclaration = getImportDeclarationForDiagnosticSpan(context.span, context.sourceFile);
148726
148809
  fixSingleImportDeclaration(t, importDeclaration, context);
@@ -148730,7 +148813,7 @@ var ts;
148730
148813
  }
148731
148814
  },
148732
148815
  fixIds: [fixId],
148733
- getAllCodeActions: function (context) {
148816
+ getAllCodeActions: function getAllCodeActionsToConvertToTypeOnlyImport(context) {
148734
148817
  return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
148735
148818
  var importDeclaration = getImportDeclarationForDiagnosticSpan(diag, context.sourceFile);
148736
148819
  fixSingleImportDeclaration(changes, importDeclaration, context);
@@ -148769,7 +148852,7 @@ var ts;
148769
148852
  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
148853
  codefix.registerCodeFix({
148771
148854
  errorCodes: errorCodes,
148772
- getCodeActions: function (context) {
148855
+ getCodeActions: function getCodeActionsToConvertLiteralTypeToMappedType(context) {
148773
148856
  var sourceFile = context.sourceFile, span = context.span;
148774
148857
  var info = getInfo(sourceFile, span.start);
148775
148858
  if (!info) {
@@ -149913,7 +149996,7 @@ var ts;
149913
149996
  _a);
149914
149997
  codefix.registerCodeFix({
149915
149998
  errorCodes: errorCodes,
149916
- getCodeActions: function (context) {
149999
+ getCodeActions: function getCodeActionsToFixOverrideModifierIssues(context) {
149917
150000
  var errorCode = context.errorCode, span = context.span;
149918
150001
  var info = errorCodeFixIdMap[errorCode];
149919
150002
  if (!info)
@@ -150109,7 +150192,7 @@ var ts;
150109
150192
  ];
150110
150193
  codefix.registerCodeFix({
150111
150194
  errorCodes: errorCodes,
150112
- getCodeActions: function (context) {
150195
+ getCodeActions: function getCodeActionsToFixIncorrectNamedTupleSyntax(context) {
150113
150196
  var sourceFile = context.sourceFile, span = context.span;
150114
150197
  var namedTupleMember = getNamedTupleMember(sourceFile, span.start);
150115
150198
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, namedTupleMember); });
@@ -150308,7 +150391,7 @@ var ts;
150308
150391
  codefix.registerCodeFix({
150309
150392
  errorCodes: errorCodes,
150310
150393
  fixIds: [fixIdAddReturnStatement, fixRemoveBracesFromArrowFunctionBody, fixIdWrapTheBlockWithParen],
150311
- getCodeActions: function (context) {
150394
+ getCodeActions: function getCodeActionsToCorrectReturnValue(context) {
150312
150395
  var program = context.program, sourceFile = context.sourceFile, start = context.span.start, errorCode = context.errorCode;
150313
150396
  var info = getInfo(program.getTypeChecker(), sourceFile, start, errorCode);
150314
150397
  if (!info)
@@ -151058,7 +151141,7 @@ var ts;
151058
151141
  ];
151059
151142
  codefix.registerCodeFix({
151060
151143
  errorCodes: errorCodes,
151061
- getCodeActions: function (context) {
151144
+ getCodeActions: function getCodeActionsToFixNotFoundModule(context) {
151062
151145
  var host = context.host, sourceFile = context.sourceFile, start = context.span.start;
151063
151146
  var packageName = tryGetImportedPackageName(sourceFile, start);
151064
151147
  if (packageName === undefined)
@@ -151119,7 +151202,7 @@ var ts;
151119
151202
  var fixId = "fixClassDoesntImplementInheritedAbstractMember";
151120
151203
  codefix.registerCodeFix({
151121
151204
  errorCodes: errorCodes,
151122
- getCodeActions: function (context) {
151205
+ getCodeActions: function getCodeActionsToFixClassNotImplementingInheritedMembers(context) {
151123
151206
  var sourceFile = context.sourceFile, span = context.span;
151124
151207
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) {
151125
151208
  return addMissingMembers(getClass(sourceFile, span.start), sourceFile, context, t, context.preferences);
@@ -151127,7 +151210,7 @@ var ts;
151127
151210
  return changes.length === 0 ? undefined : [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Implement_inherited_abstract_class, fixId, ts.Diagnostics.Implement_all_inherited_abstract_classes)];
151128
151211
  },
151129
151212
  fixIds: [fixId],
151130
- getAllCodeActions: function (context) {
151213
+ getAllCodeActions: function getAllCodeActionsToFixClassDoesntImplementInheritedAbstractMember(context) {
151131
151214
  var seenClassDeclarations = new ts.Map();
151132
151215
  return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
151133
151216
  var classDeclaration = getClass(diag.file, diag.start);
@@ -151260,7 +151343,7 @@ var ts;
151260
151343
  ];
151261
151344
  codefix.registerCodeFix({
151262
151345
  errorCodes: errorCodes,
151263
- getCodeActions: function (context) {
151346
+ getCodeActions: function getCodeActionsToEnableExperimentalDecorators(context) {
151264
151347
  var configFile = context.program.getCompilerOptions().configFile;
151265
151348
  if (configFile === undefined) {
151266
151349
  return undefined;
@@ -151291,7 +151374,7 @@ var ts;
151291
151374
  var errorCodes = [ts.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];
151292
151375
  codefix.registerCodeFix({
151293
151376
  errorCodes: errorCodes,
151294
- getCodeActions: function (context) {
151377
+ getCodeActions: function getCodeActionsToFixEnableJsxFlag(context) {
151295
151378
  var configFile = context.program.getCompilerOptions().configFile;
151296
151379
  if (configFile === undefined) {
151297
151380
  return undefined;
@@ -151329,7 +151412,7 @@ var ts;
151329
151412
  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
151413
  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
151414
  ],
151332
- getCodeActions: function (context) {
151415
+ getCodeActions: function getCodeActionsToFixModuleAndTarget(context) {
151333
151416
  var compilerOptions = context.program.getCompilerOptions();
151334
151417
  var configFile = compilerOptions.configFile;
151335
151418
  if (configFile === undefined) {
@@ -152101,7 +152184,7 @@ var ts;
152101
152184
  return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Add_async_modifier_to_containing_function, fixId, ts.Diagnostics.Add_all_missing_async_modifiers)];
152102
152185
  },
152103
152186
  fixIds: [fixId],
152104
- getAllCodeActions: function (context) {
152187
+ getAllCodeActions: function getAllCodeActionsToFixAwaitInSyncFunction(context) {
152105
152188
  var seen = new ts.Map();
152106
152189
  return codefix.codeFixAll(context, errorCodes, function (changes, diag) {
152107
152190
  var nodes = getNodes(diag.file, diag.start);
@@ -153223,7 +153306,7 @@ var ts;
153223
153306
  codefix.registerCodeFix({
153224
153307
  errorCodes: errorCodes,
153225
153308
  fixIds: [fixId],
153226
- getCodeActions: function (context) {
153309
+ getCodeActions: function getCodeActionsToFixReturnTypeInAsyncFunction(context) {
153227
153310
  var sourceFile = context.sourceFile, program = context.program, span = context.span;
153228
153311
  var checker = program.getTypeChecker();
153229
153312
  var info = getInfo(sourceFile, program.getTypeChecker(), span.start);
@@ -153277,7 +153360,7 @@ var ts;
153277
153360
  });
153278
153361
  codefix.registerCodeFix({
153279
153362
  errorCodes: errorCodes,
153280
- getCodeActions: function (context) {
153363
+ getCodeActions: function getCodeActionsToDisableJsDiagnostics(context) {
153281
153364
  var sourceFile = context.sourceFile, program = context.program, span = context.span, host = context.host, formatContext = context.formatContext;
153282
153365
  if (!ts.isInJSFile(sourceFile) || !ts.isCheckJsEnabledForFile(sourceFile, program.getCompilerOptions())) {
153283
153366
  return undefined;
@@ -154046,7 +154129,7 @@ var ts;
154046
154129
  var errorCodes = [ts.Diagnostics.Property_0_has_no_initializer_and_is_not_definitely_assigned_in_the_constructor.code];
154047
154130
  codefix.registerCodeFix({
154048
154131
  errorCodes: errorCodes,
154049
- getCodeActions: function (context) {
154132
+ getCodeActions: function getCodeActionsForStrictClassInitializationErrors(context) {
154050
154133
  var propertyDeclaration = getPropertyDeclaration(context.sourceFile, context.span.start);
154051
154134
  if (!propertyDeclaration)
154052
154135
  return;
@@ -154269,7 +154352,7 @@ var ts;
154269
154352
  ];
154270
154353
  codefix.registerCodeFix({
154271
154354
  errorCodes: errorCodes,
154272
- getCodeActions: function (context) {
154355
+ getCodeActions: function getCodeActionsToUseBigintLiteral(context) {
154273
154356
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span); });
154274
154357
  if (changes.length > 0) {
154275
154358
  return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Convert_to_a_bigint_numeric_literal, fixId, ts.Diagnostics.Convert_all_to_bigint_numeric_literals)];
@@ -154301,7 +154384,7 @@ var ts;
154301
154384
  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
154385
  codefix.registerCodeFix({
154303
154386
  errorCodes: errorCodes,
154304
- getCodeActions: function (context) {
154387
+ getCodeActions: function getCodeActionsToAddMissingTypeof(context) {
154305
154388
  var sourceFile = context.sourceFile, span = context.span;
154306
154389
  var importType = getImportTypeNode(sourceFile, span.start);
154307
154390
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return doChange(t, sourceFile, importType); });
@@ -154333,7 +154416,7 @@ var ts;
154333
154416
  var errorCodes = [ts.Diagnostics.JSX_expressions_must_have_one_parent_element.code];
154334
154417
  codefix.registerCodeFix({
154335
154418
  errorCodes: errorCodes,
154336
- getCodeActions: function (context) {
154419
+ getCodeActions: function getCodeActionsToWrapJsxInFragment(context) {
154337
154420
  var sourceFile = context.sourceFile, span = context.span;
154338
154421
  var node = findNodeToFix(sourceFile, span.start);
154339
154422
  if (!node)
@@ -154405,12 +154488,11 @@ var ts;
154405
154488
  (function (ts) {
154406
154489
  var codefix;
154407
154490
  (function (codefix) {
154408
- var fixIdAddMissingTypeof = "fixConvertToMappedObjectType";
154409
- var fixId = fixIdAddMissingTypeof;
154491
+ var fixId = "fixConvertToMappedObjectType";
154410
154492
  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
154493
  codefix.registerCodeFix({
154412
154494
  errorCodes: errorCodes,
154413
- getCodeActions: function (context) {
154495
+ getCodeActions: function getCodeActionsToConvertToMappedTypeObject(context) {
154414
154496
  var sourceFile = context.sourceFile, span = context.span;
154415
154497
  var info = getInfo(sourceFile, span.start);
154416
154498
  if (!info)
@@ -154489,7 +154571,7 @@ var ts;
154489
154571
  ];
154490
154572
  codefix.registerCodeFix({
154491
154573
  errorCodes: errorCodes,
154492
- getCodeActions: function (context) {
154574
+ getCodeActions: function getCodeActionsToRemoveUnnecessaryAwait(context) {
154493
154575
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) { return makeChange(t, context.sourceFile, context.span); });
154494
154576
  if (changes.length > 0) {
154495
154577
  return [codefix.createCodeFixAction(fixId, changes, ts.Diagnostics.Remove_unnecessary_await, fixId, ts.Diagnostics.Remove_all_unnecessary_uses_of_await)];
@@ -154531,7 +154613,7 @@ var ts;
154531
154613
  codefix.registerCodeFix({
154532
154614
  errorCodes: errorCodes,
154533
154615
  fixIds: [fixId],
154534
- getCodeActions: function (context) {
154616
+ getCodeActions: function getCodeActionsToSplitTypeOnlyImport(context) {
154535
154617
  var changes = ts.textChanges.ChangeTracker.with(context, function (t) {
154536
154618
  return splitTypeOnlyImport(t, getImportDeclaration(context.sourceFile, context.span), context);
154537
154619
  });
@@ -154567,7 +154649,7 @@ var ts;
154567
154649
  var errorCodes = [ts.Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];
154568
154650
  codefix.registerCodeFix({
154569
154651
  errorCodes: errorCodes,
154570
- getCodeActions: function (context) {
154652
+ getCodeActions: function getCodeActionsToConvertConstToLet(context) {
154571
154653
  var sourceFile = context.sourceFile, span = context.span, program = context.program;
154572
154654
  var range = getConstTokenRange(sourceFile, span.start, program);
154573
154655
  if (range === undefined)