typescript 4.6.0-dev.20211201 → 4.6.0-dev.20211205

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.
@@ -89,7 +89,7 @@ var ts;
89
89
  // The following is baselined as a literal template type without intervention
90
90
  /** The version of the TypeScript compiler release */
91
91
  // eslint-disable-next-line @typescript-eslint/no-inferrable-types
92
- ts.version = ts.versionMajorMinor + ".0-dev.20211201";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20211205";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -832,7 +832,11 @@ var ts;
832
832
  }
833
833
  return deduplicated;
834
834
  }
835
- function insertSorted(array, insert, compare) {
835
+ function createSortedArray() {
836
+ return []; // TODO: GH#19873
837
+ }
838
+ ts.createSortedArray = createSortedArray;
839
+ function insertSorted(array, insert, compare, allowDuplicates) {
836
840
  if (array.length === 0) {
837
841
  array.push(insert);
838
842
  return;
@@ -841,6 +845,9 @@ var ts;
841
845
  if (insertIndex < 0) {
842
846
  array.splice(~insertIndex, 0, insert);
843
847
  }
848
+ else if (allowDuplicates) {
849
+ array.splice(insertIndex, 0, insert);
850
+ }
844
851
  }
845
852
  ts.insertSorted = insertSorted;
846
853
  function sortAndDeduplicate(array, comparer, equalityComparer) {
@@ -8206,6 +8213,7 @@ var ts;
8206
8213
  Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: diag(2308, ts.DiagnosticCategory.Error, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),
8207
8214
  An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: diag(2309, ts.DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."),
8208
8215
  Type_0_recursively_references_itself_as_a_base_type: diag(2310, ts.DiagnosticCategory.Error, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."),
8216
+ Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function: diag(2311, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function_2311", "Cannot find name '{0}'. Did you mean to write this in an async function?"),
8209
8217
  An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2312, ts.DiagnosticCategory.Error, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."),
8210
8218
  Type_parameter_0_has_a_circular_constraint: diag(2313, ts.DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."),
8211
8219
  Generic_type_0_requires_1_type_argument_s: diag(2314, ts.DiagnosticCategory.Error, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."),
@@ -20747,6 +20755,10 @@ var ts;
20747
20755
  return text.replace(/\$/gm, "\\$");
20748
20756
  }
20749
20757
  ts.escapeSnippetText = escapeSnippetText;
20758
+ function isThisTypeParameter(type) {
20759
+ return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType);
20760
+ }
20761
+ ts.isThisTypeParameter = isThisTypeParameter;
20750
20762
  })(ts || (ts = {}));
20751
20763
  /* @internal */
20752
20764
  var ts;
@@ -37999,7 +38011,11 @@ var ts;
37999
38011
  var ts;
38000
38012
  (function (ts) {
38001
38013
  /* @internal */
38002
- ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean", defaultValueDescription: "false" };
38014
+ ts.compileOnSaveCommandLineOption = {
38015
+ name: "compileOnSave",
38016
+ type: "boolean",
38017
+ defaultValueDescription: false,
38018
+ };
38003
38019
  var jsxOptionMap = new ts.Map(ts.getEntries({
38004
38020
  "preserve": 1 /* Preserve */,
38005
38021
  "react-native": 3 /* ReactNative */,
@@ -38113,6 +38129,7 @@ var ts;
38113
38129
  })),
38114
38130
  category: ts.Diagnostics.Watch_and_Build_Modes,
38115
38131
  description: ts.Diagnostics.Specify_how_the_TypeScript_watch_mode_works,
38132
+ defaultValueDescription: ts.WatchFileKind.UseFsEvents,
38116
38133
  },
38117
38134
  {
38118
38135
  name: "watchDirectory",
@@ -38124,6 +38141,7 @@ var ts;
38124
38141
  })),
38125
38142
  category: ts.Diagnostics.Watch_and_Build_Modes,
38126
38143
  description: ts.Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,
38144
+ defaultValueDescription: ts.WatchDirectoryKind.UseFsEvents,
38127
38145
  },
38128
38146
  {
38129
38147
  name: "fallbackPolling",
@@ -38135,13 +38153,14 @@ var ts;
38135
38153
  })),
38136
38154
  category: ts.Diagnostics.Watch_and_Build_Modes,
38137
38155
  description: ts.Diagnostics.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,
38156
+ defaultValueDescription: ts.PollingWatchKind.PriorityInterval,
38138
38157
  },
38139
38158
  {
38140
38159
  name: "synchronousWatchDirectory",
38141
38160
  type: "boolean",
38142
38161
  category: ts.Diagnostics.Watch_and_Build_Modes,
38143
38162
  description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
38144
- defaultValueDescription: "false",
38163
+ defaultValueDescription: false,
38145
38164
  },
38146
38165
  {
38147
38166
  name: "excludeDirectories",
@@ -38177,13 +38196,13 @@ var ts;
38177
38196
  showInSimplifiedHelpView: true,
38178
38197
  category: ts.Diagnostics.Command_line_Options,
38179
38198
  description: ts.Diagnostics.Print_this_message,
38180
- defaultValueDescription: "false",
38199
+ defaultValueDescription: false,
38181
38200
  },
38182
38201
  {
38183
38202
  name: "help",
38184
38203
  shortName: "?",
38185
38204
  type: "boolean",
38186
- defaultValueDescription: "false",
38205
+ defaultValueDescription: false,
38187
38206
  },
38188
38207
  {
38189
38208
  name: "watch",
@@ -38193,7 +38212,7 @@ var ts;
38193
38212
  isCommandLineOnly: true,
38194
38213
  category: ts.Diagnostics.Command_line_Options,
38195
38214
  description: ts.Diagnostics.Watch_input_files,
38196
- defaultValueDescription: "false",
38215
+ defaultValueDescription: false,
38197
38216
  },
38198
38217
  {
38199
38218
  name: "preserveWatchOutput",
@@ -38201,28 +38220,28 @@ var ts;
38201
38220
  showInSimplifiedHelpView: false,
38202
38221
  category: ts.Diagnostics.Output_Formatting,
38203
38222
  description: ts.Diagnostics.Disable_wiping_the_console_in_watch_mode,
38204
- defaultValueDescription: "false",
38223
+ defaultValueDescription: false,
38205
38224
  },
38206
38225
  {
38207
38226
  name: "listFiles",
38208
38227
  type: "boolean",
38209
38228
  category: ts.Diagnostics.Compiler_Diagnostics,
38210
38229
  description: ts.Diagnostics.Print_all_of_the_files_read_during_the_compilation,
38211
- defaultValueDescription: "false"
38230
+ defaultValueDescription: false,
38212
38231
  },
38213
38232
  {
38214
38233
  name: "explainFiles",
38215
38234
  type: "boolean",
38216
38235
  category: ts.Diagnostics.Compiler_Diagnostics,
38217
38236
  description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,
38218
- defaultValueDescription: "false",
38237
+ defaultValueDescription: false,
38219
38238
  },
38220
38239
  {
38221
38240
  name: "listEmittedFiles",
38222
38241
  type: "boolean",
38223
38242
  category: ts.Diagnostics.Compiler_Diagnostics,
38224
38243
  description: ts.Diagnostics.Print_the_names_of_emitted_files_after_a_compilation,
38225
- defaultValueDescription: "false"
38244
+ defaultValueDescription: false,
38226
38245
  },
38227
38246
  {
38228
38247
  name: "pretty",
@@ -38230,28 +38249,28 @@ var ts;
38230
38249
  showInSimplifiedHelpView: true,
38231
38250
  category: ts.Diagnostics.Output_Formatting,
38232
38251
  description: ts.Diagnostics.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,
38233
- defaultValueDescription: "true"
38252
+ defaultValueDescription: true,
38234
38253
  },
38235
38254
  {
38236
38255
  name: "traceResolution",
38237
38256
  type: "boolean",
38238
38257
  category: ts.Diagnostics.Compiler_Diagnostics,
38239
38258
  description: ts.Diagnostics.Log_paths_used_during_the_moduleResolution_process,
38240
- defaultValueDescription: "false"
38259
+ defaultValueDescription: false,
38241
38260
  },
38242
38261
  {
38243
38262
  name: "diagnostics",
38244
38263
  type: "boolean",
38245
38264
  category: ts.Diagnostics.Compiler_Diagnostics,
38246
38265
  description: ts.Diagnostics.Output_compiler_performance_information_after_building,
38247
- defaultValueDescription: "false"
38266
+ defaultValueDescription: false,
38248
38267
  },
38249
38268
  {
38250
38269
  name: "extendedDiagnostics",
38251
38270
  type: "boolean",
38252
38271
  category: ts.Diagnostics.Compiler_Diagnostics,
38253
38272
  description: ts.Diagnostics.Output_more_detailed_compiler_performance_information_after_building,
38254
- defaultValueDescription: "false"
38273
+ defaultValueDescription: false,
38255
38274
  },
38256
38275
  {
38257
38276
  name: "generateCpuProfile",
@@ -38287,7 +38306,7 @@ var ts;
38287
38306
  affectsEmit: true,
38288
38307
  category: ts.Diagnostics.Watch_and_Build_Modes,
38289
38308
  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,
38290
- defaultValueDescription: "false",
38309
+ defaultValueDescription: false,
38291
38310
  },
38292
38311
  {
38293
38312
  name: "locale",
@@ -38323,7 +38342,7 @@ var ts;
38323
38342
  showInSimplifiedHelpView: true,
38324
38343
  category: ts.Diagnostics.Language_and_Environment,
38325
38344
  description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
38326
- defaultValueDescription: "ES3"
38345
+ defaultValueDescription: 0 /* ES3 */,
38327
38346
  };
38328
38347
  var commandOptionsWithoutBuild = [
38329
38348
  // CommandLine only options
@@ -38333,7 +38352,7 @@ var ts;
38333
38352
  showInSimplifiedHelpView: true,
38334
38353
  category: ts.Diagnostics.Command_line_Options,
38335
38354
  description: ts.Diagnostics.Show_all_compiler_options,
38336
- defaultValueDescription: "false",
38355
+ defaultValueDescription: false,
38337
38356
  },
38338
38357
  {
38339
38358
  name: "version",
@@ -38342,7 +38361,7 @@ var ts;
38342
38361
  showInSimplifiedHelpView: true,
38343
38362
  category: ts.Diagnostics.Command_line_Options,
38344
38363
  description: ts.Diagnostics.Print_the_compiler_s_version,
38345
- defaultValueDescription: "false",
38364
+ defaultValueDescription: false,
38346
38365
  },
38347
38366
  {
38348
38367
  name: "init",
@@ -38350,7 +38369,7 @@ var ts;
38350
38369
  showInSimplifiedHelpView: true,
38351
38370
  category: ts.Diagnostics.Command_line_Options,
38352
38371
  description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
38353
- defaultValueDescription: "false",
38372
+ defaultValueDescription: false,
38354
38373
  },
38355
38374
  {
38356
38375
  name: "project",
@@ -38369,7 +38388,7 @@ var ts;
38369
38388
  showInSimplifiedHelpView: true,
38370
38389
  category: ts.Diagnostics.Command_line_Options,
38371
38390
  description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,
38372
- defaultValueDescription: "false",
38391
+ defaultValueDescription: false,
38373
38392
  },
38374
38393
  {
38375
38394
  name: "showConfig",
@@ -38378,7 +38397,7 @@ var ts;
38378
38397
  category: ts.Diagnostics.Command_line_Options,
38379
38398
  isCommandLineOnly: true,
38380
38399
  description: ts.Diagnostics.Print_the_final_configuration_instead_of_building,
38381
- defaultValueDescription: "false",
38400
+ defaultValueDescription: false,
38382
38401
  },
38383
38402
  {
38384
38403
  name: "listFilesOnly",
@@ -38388,7 +38407,7 @@ var ts;
38388
38407
  affectsEmit: true,
38389
38408
  isCommandLineOnly: true,
38390
38409
  description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
38391
- defaultValueDescription: "false",
38410
+ defaultValueDescription: false,
38392
38411
  },
38393
38412
  // Basic
38394
38413
  ts.targetOptionDeclaration,
@@ -38415,13 +38434,15 @@ var ts;
38415
38434
  showInSimplifiedHelpView: true,
38416
38435
  category: ts.Diagnostics.Modules,
38417
38436
  description: ts.Diagnostics.Specify_what_module_code_is_generated,
38437
+ defaultValueDescription: undefined,
38418
38438
  },
38419
38439
  {
38420
38440
  name: "lib",
38421
38441
  type: "list",
38422
38442
  element: {
38423
38443
  name: "lib",
38424
- type: ts.libMap
38444
+ type: ts.libMap,
38445
+ defaultValueDescription: undefined,
38425
38446
  },
38426
38447
  affectsProgramStructure: true,
38427
38448
  showInSimplifiedHelpView: true,
@@ -38436,7 +38457,7 @@ var ts;
38436
38457
  showInSimplifiedHelpView: true,
38437
38458
  category: ts.Diagnostics.JavaScript_Support,
38438
38459
  description: ts.Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
38439
- defaultValueDescription: "false"
38460
+ defaultValueDescription: false,
38440
38461
  },
38441
38462
  {
38442
38463
  name: "checkJs",
@@ -38444,7 +38465,7 @@ var ts;
38444
38465
  showInSimplifiedHelpView: true,
38445
38466
  category: ts.Diagnostics.JavaScript_Support,
38446
38467
  description: ts.Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
38447
- defaultValueDescription: "false"
38468
+ defaultValueDescription: false,
38448
38469
  },
38449
38470
  {
38450
38471
  name: "jsx",
@@ -38456,7 +38477,7 @@ var ts;
38456
38477
  showInSimplifiedHelpView: true,
38457
38478
  category: ts.Diagnostics.Language_and_Environment,
38458
38479
  description: ts.Diagnostics.Specify_what_JSX_code_is_generated,
38459
- defaultValueDescription: "undefined"
38480
+ defaultValueDescription: undefined,
38460
38481
  },
38461
38482
  {
38462
38483
  name: "declaration",
@@ -38476,7 +38497,7 @@ var ts;
38476
38497
  showInSimplifiedHelpView: true,
38477
38498
  category: ts.Diagnostics.Emit,
38478
38499
  transpileOptionValue: undefined,
38479
- defaultValueDescription: "false",
38500
+ defaultValueDescription: false,
38480
38501
  description: ts.Diagnostics.Create_sourcemaps_for_d_ts_files
38481
38502
  },
38482
38503
  {
@@ -38487,7 +38508,7 @@ var ts;
38487
38508
  category: ts.Diagnostics.Emit,
38488
38509
  description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
38489
38510
  transpileOptionValue: undefined,
38490
- defaultValueDescription: "false",
38511
+ defaultValueDescription: false,
38491
38512
  },
38492
38513
  {
38493
38514
  name: "sourceMap",
@@ -38495,7 +38516,7 @@ var ts;
38495
38516
  affectsEmit: true,
38496
38517
  showInSimplifiedHelpView: true,
38497
38518
  category: ts.Diagnostics.Emit,
38498
- defaultValueDescription: "false",
38519
+ defaultValueDescription: false,
38499
38520
  description: ts.Diagnostics.Create_source_map_files_for_emitted_JavaScript_files,
38500
38521
  },
38501
38522
  {
@@ -38536,7 +38557,7 @@ var ts;
38536
38557
  isTSConfigOnly: true,
38537
38558
  category: ts.Diagnostics.Projects,
38538
38559
  transpileOptionValue: undefined,
38539
- defaultValueDescription: "false",
38560
+ defaultValueDescription: false,
38540
38561
  description: ts.Diagnostics.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references,
38541
38562
  },
38542
38563
  {
@@ -38556,7 +38577,7 @@ var ts;
38556
38577
  affectsEmit: true,
38557
38578
  showInSimplifiedHelpView: true,
38558
38579
  category: ts.Diagnostics.Emit,
38559
- defaultValueDescription: "false",
38580
+ defaultValueDescription: false,
38560
38581
  description: ts.Diagnostics.Disable_emitting_comments,
38561
38582
  },
38562
38583
  {
@@ -38566,7 +38587,7 @@ var ts;
38566
38587
  category: ts.Diagnostics.Emit,
38567
38588
  description: ts.Diagnostics.Disable_emitting_files_from_a_compilation,
38568
38589
  transpileOptionValue: undefined,
38569
- defaultValueDescription: "false"
38590
+ defaultValueDescription: false,
38570
38591
  },
38571
38592
  {
38572
38593
  name: "importHelpers",
@@ -38574,7 +38595,7 @@ var ts;
38574
38595
  affectsEmit: true,
38575
38596
  category: ts.Diagnostics.Emit,
38576
38597
  description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
38577
- defaultValueDescription: "false"
38598
+ defaultValueDescription: false,
38578
38599
  },
38579
38600
  {
38580
38601
  name: "importsNotUsedAsValues",
@@ -38586,7 +38607,8 @@ var ts;
38586
38607
  affectsEmit: true,
38587
38608
  affectsSemanticDiagnostics: true,
38588
38609
  category: ts.Diagnostics.Emit,
38589
- description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types
38610
+ description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types,
38611
+ defaultValueDescription: 0 /* Remove */,
38590
38612
  },
38591
38613
  {
38592
38614
  name: "downlevelIteration",
@@ -38594,7 +38616,7 @@ var ts;
38594
38616
  affectsEmit: true,
38595
38617
  category: ts.Diagnostics.Emit,
38596
38618
  description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
38597
- defaultValueDescription: "false"
38619
+ defaultValueDescription: false,
38598
38620
  },
38599
38621
  {
38600
38622
  name: "isolatedModules",
@@ -38602,7 +38624,7 @@ var ts;
38602
38624
  category: ts.Diagnostics.Interop_Constraints,
38603
38625
  description: ts.Diagnostics.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,
38604
38626
  transpileOptionValue: true,
38605
- defaultValueDescription: "false"
38627
+ defaultValueDescription: false,
38606
38628
  },
38607
38629
  // Strict Type Checks
38608
38630
  {
@@ -38613,7 +38635,7 @@ var ts;
38613
38635
  showInSimplifiedHelpView: true,
38614
38636
  category: ts.Diagnostics.Type_Checking,
38615
38637
  description: ts.Diagnostics.Enable_all_strict_type_checking_options,
38616
- defaultValueDescription: "false"
38638
+ defaultValueDescription: false,
38617
38639
  },
38618
38640
  {
38619
38641
  name: "noImplicitAny",
@@ -38674,7 +38696,7 @@ var ts;
38674
38696
  strictFlag: true,
38675
38697
  category: ts.Diagnostics.Type_Checking,
38676
38698
  description: ts.Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
38677
- defaultValueDescription: "false",
38699
+ defaultValueDescription: false,
38678
38700
  },
38679
38701
  {
38680
38702
  name: "alwaysStrict",
@@ -38692,7 +38714,7 @@ var ts;
38692
38714
  affectsSemanticDiagnostics: true,
38693
38715
  category: ts.Diagnostics.Type_Checking,
38694
38716
  description: ts.Diagnostics.Enable_error_reporting_when_a_local_variables_aren_t_read,
38695
- defaultValueDescription: "false"
38717
+ defaultValueDescription: false,
38696
38718
  },
38697
38719
  {
38698
38720
  name: "noUnusedParameters",
@@ -38700,7 +38722,7 @@ var ts;
38700
38722
  affectsSemanticDiagnostics: true,
38701
38723
  category: ts.Diagnostics.Type_Checking,
38702
38724
  description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
38703
- defaultValueDescription: "false"
38725
+ defaultValueDescription: false,
38704
38726
  },
38705
38727
  {
38706
38728
  name: "exactOptionalPropertyTypes",
@@ -38708,7 +38730,7 @@ var ts;
38708
38730
  affectsSemanticDiagnostics: true,
38709
38731
  category: ts.Diagnostics.Type_Checking,
38710
38732
  description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
38711
- defaultValueDescription: "false",
38733
+ defaultValueDescription: false,
38712
38734
  },
38713
38735
  {
38714
38736
  name: "noImplicitReturns",
@@ -38716,7 +38738,7 @@ var ts;
38716
38738
  affectsSemanticDiagnostics: true,
38717
38739
  category: ts.Diagnostics.Type_Checking,
38718
38740
  description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
38719
- defaultValueDescription: "false"
38741
+ defaultValueDescription: false,
38720
38742
  },
38721
38743
  {
38722
38744
  name: "noFallthroughCasesInSwitch",
@@ -38725,7 +38747,7 @@ var ts;
38725
38747
  affectsSemanticDiagnostics: true,
38726
38748
  category: ts.Diagnostics.Type_Checking,
38727
38749
  description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
38728
- defaultValueDescription: "false",
38750
+ defaultValueDescription: false,
38729
38751
  },
38730
38752
  {
38731
38753
  name: "noUncheckedIndexedAccess",
@@ -38733,7 +38755,7 @@ var ts;
38733
38755
  affectsSemanticDiagnostics: true,
38734
38756
  category: ts.Diagnostics.Type_Checking,
38735
38757
  description: ts.Diagnostics.Include_undefined_in_index_signature_results,
38736
- defaultValueDescription: "false",
38758
+ defaultValueDescription: false,
38737
38759
  },
38738
38760
  {
38739
38761
  name: "noImplicitOverride",
@@ -38741,7 +38763,7 @@ var ts;
38741
38763
  affectsSemanticDiagnostics: true,
38742
38764
  category: ts.Diagnostics.Type_Checking,
38743
38765
  description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
38744
- defaultValueDescription: "false",
38766
+ defaultValueDescription: false,
38745
38767
  },
38746
38768
  {
38747
38769
  name: "noPropertyAccessFromIndexSignature",
@@ -38749,7 +38771,7 @@ var ts;
38749
38771
  showInSimplifiedHelpView: false,
38750
38772
  category: ts.Diagnostics.Type_Checking,
38751
38773
  description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
38752
- defaultValueDescription: "false"
38774
+ defaultValueDescription: false,
38753
38775
  },
38754
38776
  // Module Resolution
38755
38777
  {
@@ -38843,14 +38865,14 @@ var ts;
38843
38865
  showInSimplifiedHelpView: true,
38844
38866
  category: ts.Diagnostics.Interop_Constraints,
38845
38867
  description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
38846
- defaultValueDescription: "false"
38868
+ defaultValueDescription: false,
38847
38869
  },
38848
38870
  {
38849
38871
  name: "preserveSymlinks",
38850
38872
  type: "boolean",
38851
38873
  category: ts.Diagnostics.Interop_Constraints,
38852
38874
  description: ts.Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,
38853
- defaultValueDescription: "false",
38875
+ defaultValueDescription: false,
38854
38876
  },
38855
38877
  {
38856
38878
  name: "allowUmdGlobalAccess",
@@ -38858,7 +38880,7 @@ var ts;
38858
38880
  affectsSemanticDiagnostics: true,
38859
38881
  category: ts.Diagnostics.Modules,
38860
38882
  description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
38861
- defaultValueDescription: "false"
38883
+ defaultValueDescription: false,
38862
38884
  },
38863
38885
  // Source Maps
38864
38886
  {
@@ -38883,7 +38905,7 @@ var ts;
38883
38905
  affectsEmit: true,
38884
38906
  category: ts.Diagnostics.Emit,
38885
38907
  description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
38886
- defaultValueDescription: "false"
38908
+ defaultValueDescription: false,
38887
38909
  },
38888
38910
  {
38889
38911
  name: "inlineSources",
@@ -38891,7 +38913,7 @@ var ts;
38891
38913
  affectsEmit: true,
38892
38914
  category: ts.Diagnostics.Emit,
38893
38915
  description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
38894
- defaultValueDescription: "false"
38916
+ defaultValueDescription: false,
38895
38917
  },
38896
38918
  // Experimental
38897
38919
  {
@@ -38900,7 +38922,7 @@ var ts;
38900
38922
  affectsSemanticDiagnostics: true,
38901
38923
  category: ts.Diagnostics.Language_and_Environment,
38902
38924
  description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
38903
- defaultValueDescription: "false",
38925
+ defaultValueDescription: false,
38904
38926
  },
38905
38927
  {
38906
38928
  name: "emitDecoratorMetadata",
@@ -38909,7 +38931,7 @@ var ts;
38909
38931
  affectsEmit: true,
38910
38932
  category: ts.Diagnostics.Language_and_Environment,
38911
38933
  description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
38912
- defaultValueDescription: "false",
38934
+ defaultValueDescription: false,
38913
38935
  },
38914
38936
  // Advanced
38915
38937
  {
@@ -38941,7 +38963,7 @@ var ts;
38941
38963
  affectsModuleResolution: true,
38942
38964
  category: ts.Diagnostics.Modules,
38943
38965
  description: ts.Diagnostics.Enable_importing_json_files,
38944
- defaultValueDescription: "false"
38966
+ defaultValueDescription: false,
38945
38967
  },
38946
38968
  {
38947
38969
  name: "out",
@@ -38967,7 +38989,7 @@ var ts;
38967
38989
  type: "boolean",
38968
38990
  category: ts.Diagnostics.Completeness,
38969
38991
  description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
38970
- defaultValueDescription: "false",
38992
+ defaultValueDescription: false,
38971
38993
  },
38972
38994
  {
38973
38995
  name: "charset",
@@ -38982,7 +39004,7 @@ var ts;
38982
39004
  affectsEmit: true,
38983
39005
  category: ts.Diagnostics.Emit,
38984
39006
  description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
38985
- defaultValueDescription: "false"
39007
+ defaultValueDescription: false,
38986
39008
  },
38987
39009
  {
38988
39010
  name: "newLine",
@@ -39002,7 +39024,7 @@ var ts;
39002
39024
  affectsSemanticDiagnostics: true,
39003
39025
  category: ts.Diagnostics.Output_Formatting,
39004
39026
  description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
39005
- defaultValueDescription: "false"
39027
+ defaultValueDescription: false,
39006
39028
  },
39007
39029
  {
39008
39030
  name: "noLib",
@@ -39013,7 +39035,7 @@ var ts;
39013
39035
  // We are not returning a sourceFile for lib file when asked by the program,
39014
39036
  // so pass --noLib to avoid reporting a file not found error.
39015
39037
  transpileOptionValue: true,
39016
- defaultValueDescription: "false"
39038
+ defaultValueDescription: false,
39017
39039
  },
39018
39040
  {
39019
39041
  name: "noResolve",
@@ -39024,7 +39046,7 @@ var ts;
39024
39046
  // We are not doing a full typecheck, we are not resolving the whole context,
39025
39047
  // so pass --noResolve to avoid reporting missing file errors.
39026
39048
  transpileOptionValue: true,
39027
- defaultValueDescription: "false"
39049
+ defaultValueDescription: false,
39028
39050
  },
39029
39051
  {
39030
39052
  name: "stripInternal",
@@ -39032,7 +39054,7 @@ var ts;
39032
39054
  affectsEmit: true,
39033
39055
  category: ts.Diagnostics.Emit,
39034
39056
  description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
39035
- defaultValueDescription: "false",
39057
+ defaultValueDescription: false,
39036
39058
  },
39037
39059
  {
39038
39060
  name: "disableSizeLimit",
@@ -39040,7 +39062,7 @@ var ts;
39040
39062
  affectsProgramStructure: true,
39041
39063
  category: ts.Diagnostics.Editor_Support,
39042
39064
  description: ts.Diagnostics.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,
39043
- defaultValueDescription: "false"
39065
+ defaultValueDescription: false,
39044
39066
  },
39045
39067
  {
39046
39068
  name: "disableSourceOfProjectReferenceRedirect",
@@ -39048,7 +39070,7 @@ var ts;
39048
39070
  isTSConfigOnly: true,
39049
39071
  category: ts.Diagnostics.Projects,
39050
39072
  description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,
39051
- defaultValueDescription: "false",
39073
+ defaultValueDescription: false,
39052
39074
  },
39053
39075
  {
39054
39076
  name: "disableSolutionSearching",
@@ -39056,7 +39078,7 @@ var ts;
39056
39078
  isTSConfigOnly: true,
39057
39079
  category: ts.Diagnostics.Projects,
39058
39080
  description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,
39059
- defaultValueDescription: "false",
39081
+ defaultValueDescription: false,
39060
39082
  },
39061
39083
  {
39062
39084
  name: "disableReferencedProjectLoad",
@@ -39064,7 +39086,7 @@ var ts;
39064
39086
  isTSConfigOnly: true,
39065
39087
  category: ts.Diagnostics.Projects,
39066
39088
  description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,
39067
- defaultValueDescription: "false",
39089
+ defaultValueDescription: false,
39068
39090
  },
39069
39091
  {
39070
39092
  name: "noImplicitUseStrict",
@@ -39072,7 +39094,7 @@ var ts;
39072
39094
  affectsSemanticDiagnostics: true,
39073
39095
  category: ts.Diagnostics.Backwards_Compatibility,
39074
39096
  description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
39075
- defaultValueDescription: "false"
39097
+ defaultValueDescription: false,
39076
39098
  },
39077
39099
  {
39078
39100
  name: "noEmitHelpers",
@@ -39080,7 +39102,7 @@ var ts;
39080
39102
  affectsEmit: true,
39081
39103
  category: ts.Diagnostics.Emit,
39082
39104
  description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
39083
- defaultValueDescription: "false"
39105
+ defaultValueDescription: false,
39084
39106
  },
39085
39107
  {
39086
39108
  name: "noEmitOnError",
@@ -39089,7 +39111,7 @@ var ts;
39089
39111
  category: ts.Diagnostics.Emit,
39090
39112
  transpileOptionValue: undefined,
39091
39113
  description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
39092
- defaultValueDescription: "false"
39114
+ defaultValueDescription: false,
39093
39115
  },
39094
39116
  {
39095
39117
  name: "preserveConstEnums",
@@ -39097,7 +39119,7 @@ var ts;
39097
39119
  affectsEmit: true,
39098
39120
  category: ts.Diagnostics.Emit,
39099
39121
  description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
39100
- defaultValueDescription: "false",
39122
+ defaultValueDescription: false,
39101
39123
  },
39102
39124
  {
39103
39125
  name: "declarationDir",
@@ -39114,7 +39136,7 @@ var ts;
39114
39136
  type: "boolean",
39115
39137
  category: ts.Diagnostics.Completeness,
39116
39138
  description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
39117
- defaultValueDescription: "false"
39139
+ defaultValueDescription: false,
39118
39140
  },
39119
39141
  {
39120
39142
  name: "allowUnusedLabels",
@@ -39123,7 +39145,7 @@ var ts;
39123
39145
  affectsSemanticDiagnostics: true,
39124
39146
  category: ts.Diagnostics.Type_Checking,
39125
39147
  description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
39126
- defaultValueDescription: "undefined"
39148
+ defaultValueDescription: undefined,
39127
39149
  },
39128
39150
  {
39129
39151
  name: "allowUnreachableCode",
@@ -39132,7 +39154,7 @@ var ts;
39132
39154
  affectsSemanticDiagnostics: true,
39133
39155
  category: ts.Diagnostics.Type_Checking,
39134
39156
  description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
39135
- defaultValueDescription: "undefined"
39157
+ defaultValueDescription: undefined,
39136
39158
  },
39137
39159
  {
39138
39160
  name: "suppressExcessPropertyErrors",
@@ -39140,7 +39162,7 @@ var ts;
39140
39162
  affectsSemanticDiagnostics: true,
39141
39163
  category: ts.Diagnostics.Backwards_Compatibility,
39142
39164
  description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
39143
- defaultValueDescription: "false"
39165
+ defaultValueDescription: false,
39144
39166
  },
39145
39167
  {
39146
39168
  name: "suppressImplicitAnyIndexErrors",
@@ -39148,7 +39170,7 @@ var ts;
39148
39170
  affectsSemanticDiagnostics: true,
39149
39171
  category: ts.Diagnostics.Backwards_Compatibility,
39150
39172
  description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
39151
- defaultValueDescription: "false"
39173
+ defaultValueDescription: false,
39152
39174
  },
39153
39175
  {
39154
39176
  name: "forceConsistentCasingInFileNames",
@@ -39156,7 +39178,7 @@ var ts;
39156
39178
  affectsModuleResolution: true,
39157
39179
  category: ts.Diagnostics.Interop_Constraints,
39158
39180
  description: ts.Diagnostics.Ensure_that_casing_is_correct_in_imports,
39159
- defaultValueDescription: "false"
39181
+ defaultValueDescription: false,
39160
39182
  },
39161
39183
  {
39162
39184
  name: "maxNodeModuleJsDepth",
@@ -39164,7 +39186,7 @@ var ts;
39164
39186
  affectsModuleResolution: true,
39165
39187
  category: ts.Diagnostics.JavaScript_Support,
39166
39188
  description: ts.Diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,
39167
- defaultValueDescription: "0"
39189
+ defaultValueDescription: 0,
39168
39190
  },
39169
39191
  {
39170
39192
  name: "noStrictGenericChecks",
@@ -39172,7 +39194,7 @@ var ts;
39172
39194
  affectsSemanticDiagnostics: true,
39173
39195
  category: ts.Diagnostics.Backwards_Compatibility,
39174
39196
  description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
39175
- defaultValueDescription: "false"
39197
+ defaultValueDescription: false,
39176
39198
  },
39177
39199
  {
39178
39200
  name: "useDefineForClassFields",
@@ -39189,14 +39211,14 @@ var ts;
39189
39211
  affectsEmit: true,
39190
39212
  category: ts.Diagnostics.Emit,
39191
39213
  description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
39192
- defaultValueDescription: "false",
39214
+ defaultValueDescription: false,
39193
39215
  },
39194
39216
  {
39195
39217
  name: "keyofStringsOnly",
39196
39218
  type: "boolean",
39197
39219
  category: ts.Diagnostics.Backwards_Compatibility,
39198
39220
  description: ts.Diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,
39199
- defaultValueDescription: "false"
39221
+ defaultValueDescription: false,
39200
39222
  },
39201
39223
  {
39202
39224
  // A list of plugins to load in the language service
@@ -39238,7 +39260,7 @@ var ts;
39238
39260
  category: ts.Diagnostics.Command_line_Options,
39239
39261
  description: ts.Diagnostics.Enable_verbose_logging,
39240
39262
  type: "boolean",
39241
- defaultValueDescription: "false",
39263
+ defaultValueDescription: false,
39242
39264
  },
39243
39265
  {
39244
39266
  name: "dry",
@@ -39246,7 +39268,7 @@ var ts;
39246
39268
  category: ts.Diagnostics.Command_line_Options,
39247
39269
  description: ts.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,
39248
39270
  type: "boolean",
39249
- defaultValueDescription: "false",
39271
+ defaultValueDescription: false,
39250
39272
  },
39251
39273
  {
39252
39274
  name: "force",
@@ -39254,14 +39276,14 @@ var ts;
39254
39276
  category: ts.Diagnostics.Command_line_Options,
39255
39277
  description: ts.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,
39256
39278
  type: "boolean",
39257
- defaultValueDescription: "false",
39279
+ defaultValueDescription: false,
39258
39280
  },
39259
39281
  {
39260
39282
  name: "clean",
39261
39283
  category: ts.Diagnostics.Command_line_Options,
39262
39284
  description: ts.Diagnostics.Delete_the_outputs_of_all_projects,
39263
39285
  type: "boolean",
39264
- defaultValueDescription: "false",
39286
+ defaultValueDescription: false,
39265
39287
  }
39266
39288
  ];
39267
39289
  /* @internal */
@@ -39274,12 +39296,12 @@ var ts;
39274
39296
  */
39275
39297
  name: "enableAutoDiscovery",
39276
39298
  type: "boolean",
39277
- defaultValueDescription: "false",
39299
+ defaultValueDescription: false,
39278
39300
  },
39279
39301
  {
39280
39302
  name: "enable",
39281
39303
  type: "boolean",
39282
- defaultValueDescription: "false",
39304
+ defaultValueDescription: false,
39283
39305
  },
39284
39306
  {
39285
39307
  name: "include",
@@ -39300,7 +39322,7 @@ var ts;
39300
39322
  {
39301
39323
  name: "disableFilenameBasedTypeAcquisition",
39302
39324
  type: "boolean",
39303
- defaultValueDescription: "false",
39325
+ defaultValueDescription: false,
39304
39326
  },
39305
39327
  ];
39306
39328
  /*@internal*/
@@ -41432,7 +41454,10 @@ var ts;
41432
41454
  }
41433
41455
  }
41434
41456
  var failedLookupLocations = [];
41435
- var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.AllFeatures, conditions: ["node", "require", "types"] };
41457
+ var features = ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 ? NodeResolutionFeatures.Node12Default :
41458
+ ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext ? NodeResolutionFeatures.NodeNextDefault :
41459
+ NodeResolutionFeatures.None;
41460
+ var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: features, conditions: ["node", "require", "types"] };
41436
41461
  var resolved = primaryLookup();
41437
41462
  var primary = true;
41438
41463
  if (!resolved) {
@@ -42107,13 +42132,15 @@ var ts;
42107
42132
  // not currently backported to node 12 - https://github.com/nodejs/Release/issues/690
42108
42133
  NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
42109
42134
  NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
42135
+ NodeResolutionFeatures[NodeResolutionFeatures["Node12Default"] = 14] = "Node12Default";
42136
+ NodeResolutionFeatures[NodeResolutionFeatures["NodeNextDefault"] = 30] = "NodeNextDefault";
42110
42137
  NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
42111
42138
  })(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
42112
42139
  function node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
42113
- return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Imports | NodeResolutionFeatures.SelfName | NodeResolutionFeatures.Exports, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
42140
+ return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Node12Default, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
42114
42141
  }
42115
42142
  function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
42116
- return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.AllFeatures, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
42143
+ return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.NodeNextDefault, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
42117
42144
  }
42118
42145
  function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
42119
42146
  var containingDirectory = ts.getDirectoryPath(containingFile);
@@ -46819,6 +46846,7 @@ var ts;
46819
46846
  getIndexInfosOfType: getIndexInfosOfType,
46820
46847
  getSignaturesOfType: getSignaturesOfType,
46821
46848
  getIndexTypeOfType: function (type, kind) { return getIndexTypeOfType(type, kind === 0 /* String */ ? stringType : numberType); },
46849
+ getIndexType: function (type) { return getIndexType(type); },
46822
46850
  getBaseTypes: getBaseTypes,
46823
46851
  getBaseTypeOfLiteralType: getBaseTypeOfLiteralType,
46824
46852
  getWidenedType: getWidenedType,
@@ -48076,11 +48104,12 @@ var ts;
48076
48104
  *
48077
48105
  * @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
48078
48106
  */
48079
- function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
48107
+ function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions) {
48080
48108
  if (excludeGlobals === void 0) { excludeGlobals = false; }
48081
- return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol);
48109
+ if (getSpellingSuggstions === void 0) { getSpellingSuggstions = true; }
48110
+ return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions, getSymbol);
48082
48111
  }
48083
- function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
48112
+ function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
48084
48113
  var _a, _b, _c;
48085
48114
  var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
48086
48115
  var result;
@@ -48397,7 +48426,7 @@ var ts;
48397
48426
  }
48398
48427
  }
48399
48428
  if (!result) {
48400
- if (nameNotFoundMessage) {
48429
+ if (nameNotFoundMessage && produceDiagnostics) {
48401
48430
  if (!errorLocation ||
48402
48431
  !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217
48403
48432
  !checkAndReportErrorForExtendingInterface(errorLocation) &&
@@ -48407,7 +48436,7 @@ var ts;
48407
48436
  !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
48408
48437
  !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
48409
48438
  var suggestion = void 0;
48410
- if (suggestionCount < maximumSuggestionCount) {
48439
+ if (getSpellingSuggestions && suggestionCount < maximumSuggestionCount) {
48411
48440
  suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
48412
48441
  var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
48413
48442
  if (isGlobalScopeAugmentationDeclaration) {
@@ -48443,7 +48472,7 @@ var ts;
48443
48472
  return undefined;
48444
48473
  }
48445
48474
  // Perform extra checks only if error reporting was requested
48446
- if (nameNotFoundMessage) {
48475
+ if (nameNotFoundMessage && produceDiagnostics) {
48447
48476
  if (propertyWithInvalidInitializer && !(ts.getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields)) {
48448
48477
  // We have a match, but the reference occurred within a property initializer and the identifier also binds
48449
48478
  // to a local variable in the constructor where the code will be emitted. Note that this is actually allowed
@@ -50919,7 +50948,7 @@ var ts;
50919
50948
  context.approximateLength += 6;
50920
50949
  return ts.factory.createKeywordTypeNode(147 /* ObjectKeyword */);
50921
50950
  }
50922
- if (isThisTypeParameter(type)) {
50951
+ if (ts.isThisTypeParameter(type)) {
50923
50952
  if (context.flags & 4194304 /* InObjectTypeLiteral */) {
50924
50953
  if (!context.encounteredError && !(context.flags & 32768 /* AllowThisInObjectLiteral */)) {
50925
50954
  context.encounteredError = true;
@@ -58864,7 +58893,7 @@ var ts;
58864
58893
  }
58865
58894
  function getGlobalSymbol(name, meaning, diagnostic) {
58866
58895
  // Don't track references for global symbols anyway, so value if `isReference` is arbitrary
58867
- return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false);
58896
+ return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ false);
58868
58897
  }
58869
58898
  function getGlobalType(name, arity, reportErrors) {
58870
58899
  var symbol = getGlobalTypeSymbol(name, reportErrors);
@@ -60443,9 +60472,6 @@ var ts;
60443
60472
  return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 8388608 /* IsGenericObjectType */ : 0) |
60444
60473
  (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 16777216 /* IsGenericIndexType */ : 0);
60445
60474
  }
60446
- function isThisTypeParameter(type) {
60447
- return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType);
60448
- }
60449
60475
  function getSimplifiedType(type, writing) {
60450
60476
  return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) :
60451
60477
  type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) :
@@ -65643,7 +65669,7 @@ var ts;
65643
65669
  // flags for the string, number, boolean, "", 0, false, void, undefined, or null types respectively. Returns
65644
65670
  // no flags for all other types (including non-falsy literal types).
65645
65671
  function getFalsyFlags(type) {
65646
- return type.flags & 1048576 /* Union */ ? getFalsyFlagsOfTypes(type.types) :
65672
+ return type.flags & 3145728 /* UnionOrIntersection */ ? getFalsyFlagsOfTypes(type.types) :
65647
65673
  type.flags & 128 /* StringLiteral */ ? type.value === "" ? 128 /* StringLiteral */ : 0 :
65648
65674
  type.flags & 256 /* NumberLiteral */ ? type.value === 0 ? 256 /* NumberLiteral */ : 0 :
65649
65675
  type.flags & 2048 /* BigIntLiteral */ ? isZeroBigInt(type) ? 2048 /* BigIntLiteral */ : 0 :
@@ -67259,6 +67285,11 @@ var ts;
67259
67285
  case "BigInt64Array":
67260
67286
  case "BigUint64Array":
67261
67287
  return ts.Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later;
67288
+ case "await":
67289
+ if (ts.isCallExpression(node.parent)) {
67290
+ return ts.Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function;
67291
+ }
67292
+ // falls through
67262
67293
  default:
67263
67294
  if (node.parent.kind === 295 /* ShorthandPropertyAssignment */) {
67264
67295
  return ts.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;
@@ -68816,7 +68847,7 @@ var ts;
68816
68847
  function narrowByInKeyword(type, name, assumeTrue) {
68817
68848
  if (type.flags & 1048576 /* Union */
68818
68849
  || type.flags & 524288 /* Object */ && declaredType !== type
68819
- || isThisTypeParameter(type)
68850
+ || ts.isThisTypeParameter(type)
68820
68851
  || type.flags & 2097152 /* Intersection */ && ts.every(type.types, function (t) { return t.symbol !== globalThisSymbol; })) {
68821
68852
  return filterType(type, function (t) { return isTypePresencePossible(t, name, assumeTrue); });
68822
68853
  }
@@ -71636,15 +71667,9 @@ var ts;
71636
71667
  }
71637
71668
  }
71638
71669
  function isValidSpreadType(type) {
71639
- if (type.flags & 465829888 /* Instantiable */) {
71640
- var constraint = getBaseConstraintOfType(type);
71641
- if (constraint !== undefined) {
71642
- return isValidSpreadType(constraint);
71643
- }
71644
- }
71645
- return !!(type.flags & (1 /* Any */ | 67108864 /* NonPrimitive */ | 524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) ||
71646
- getFalsyFlags(type) & 117632 /* DefinitelyFalsy */ && isValidSpreadType(removeDefinitelyFalsyTypes(type)) ||
71647
- type.flags & 3145728 /* UnionOrIntersection */ && ts.every(type.types, isValidSpreadType));
71670
+ var t = removeDefinitelyFalsyTypes(mapType(type, getBaseConstraintOrType));
71671
+ return !!(t.flags & (1 /* Any */ | 67108864 /* NonPrimitive */ | 524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) ||
71672
+ t.flags & 3145728 /* UnionOrIntersection */ && ts.every(t.types, isValidSpreadType));
71648
71673
  }
71649
71674
  function checkJsxSelfClosingElementDeferred(node) {
71650
71675
  checkJsxOpeningLikeElementOrOpeningFragment(node);
@@ -72595,7 +72620,7 @@ var ts;
72595
72620
  }
72596
72621
  var propType;
72597
72622
  if (!prop) {
72598
- var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || isThisTypeParameter(leftType)) ?
72623
+ var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || ts.isThisTypeParameter(leftType)) ?
72599
72624
  getApplicableIndexInfoForName(apparentType, right.escapedText) : undefined;
72600
72625
  if (!(indexInfo && indexInfo.type)) {
72601
72626
  var isUncheckedJS = isUncheckedJSSuggestion(node, leftType.symbol, /*excludeClasses*/ true);
@@ -72612,7 +72637,7 @@ var ts;
72612
72637
  return anyType;
72613
72638
  }
72614
72639
  if (right.escapedText && !checkAndReportErrorForExtendingInterface(node)) {
72615
- reportNonexistentProperty(right, isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
72640
+ reportNonexistentProperty(right, ts.isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
72616
72641
  }
72617
72642
  return errorType;
72618
72643
  }
@@ -72905,7 +72930,7 @@ var ts;
72905
72930
  }
72906
72931
  function getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning) {
72907
72932
  ts.Debug.assert(outerName !== undefined, "outername should always be defined");
72908
- var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, function (symbols, name, meaning) {
72933
+ var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ true, function (symbols, name, meaning) {
72909
72934
  ts.Debug.assertEqual(outerName, name, "name should equal outerName");
72910
72935
  var symbol = getSymbol(symbols, name, meaning);
72911
72936
  // Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function
@@ -73151,7 +73176,7 @@ var ts;
73151
73176
  }
73152
73177
  var effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType;
73153
73178
  var accessFlags = ts.isAssignmentTarget(node) ?
73154
- 4 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 2 /* NoIndexSignatures */ : 0) :
73179
+ 4 /* Writing */ | (isGenericObjectType(objectType) && !ts.isThisTypeParameter(objectType) ? 2 /* NoIndexSignatures */ : 0) :
73155
73180
  32 /* ExpressionPosition */;
73156
73181
  var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, accessFlags, node) || errorType;
73157
73182
  return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, getNodeLinks(node).resolvedSymbol, indexedAccessType, indexExpression, checkMode), node);
@@ -86613,18 +86638,22 @@ var ts;
86613
86638
  return false;
86614
86639
  }
86615
86640
  function checkNumericLiteralValueSize(node) {
86641
+ // We should test against `getTextOfNode(node)` rather than `node.text`, because `node.text` for large numeric literals can contain "."
86642
+ // e.g. `node.text` for numeric literal `1100000000000000000000` is `1.1e21`.
86643
+ var isFractional = ts.getTextOfNode(node).indexOf(".") !== -1;
86644
+ var isScientific = node.numericLiteralFlags & 16 /* Scientific */;
86616
86645
  // Scientific notation (e.g. 2e54 and 1e00000000010) can't be converted to bigint
86617
- // Literals with 15 or fewer characters aren't long enough to reach past 2^53 - 1
86618
86646
  // Fractional numbers (e.g. 9000000000000000.001) are inherently imprecise anyway
86619
- if (node.numericLiteralFlags & 16 /* Scientific */ || node.text.length <= 15 || node.text.indexOf(".") !== -1) {
86647
+ if (isFractional || isScientific) {
86620
86648
  return;
86621
86649
  }
86622
- // We can't rely on the runtime to accurately store and compare extremely large numeric values
86623
- // Even for internal use, we use getTextOfNode: https://github.com/microsoft/TypeScript/issues/33298
86624
- // Thus, if the runtime claims a too-large number is lower than Number.MAX_SAFE_INTEGER,
86625
- // it's likely addition operations on it will fail too
86626
- var apparentValue = +ts.getTextOfNode(node);
86627
- if (apparentValue <= Math.pow(2, 53) - 1 && apparentValue + 1 > apparentValue) {
86650
+ // Here `node` is guaranteed to be a numeric literal representing an integer.
86651
+ // We need to judge whether the integer `node` represents is <= 2 ** 53 - 1, which can be accomplished by comparing to `value` defined below because:
86652
+ // 1) when `node` represents an integer <= 2 ** 53 - 1, `node.text` is its exact string representation and thus `value` precisely represents the integer.
86653
+ // 2) otherwise, although `node.text` may be imprecise string representation, its mathematical value and consequently `value` cannot be less than 2 ** 53,
86654
+ // thus the result of the predicate won't be affected.
86655
+ var value = +node.text;
86656
+ if (value <= Math.pow(2, 53) - 1) {
86628
86657
  return;
86629
86658
  }
86630
86659
  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));
@@ -90086,7 +90115,7 @@ var ts;
90086
90115
  // ], C.prototype, "prop");
90087
90116
  //
90088
90117
  var prefix = getClassMemberPrefix(node, member);
90089
- var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ true);
90118
+ var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ !ts.hasSyntacticModifier(member, 2 /* Ambient */));
90090
90119
  var descriptor = languageVersion > 0 /* ES3 */
90091
90120
  ? member.kind === 166 /* PropertyDeclaration */
90092
90121
  // We emit `void 0` here to indicate to `__decorate` that it can invoke `Object.defineProperty` directly, but that it