typescript 4.6.0-dev.20211130 → 4.6.0-dev.20211204

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.20211130";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20211204";
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;
@@ -33597,9 +33609,10 @@ var ts;
33597
33609
  // - "(x,y)" is a comma expression parsed as a signature with two parameters.
33598
33610
  // - "a ? (b): c" will have "(b):" parsed as a signature with a return type annotation.
33599
33611
  // - "a ? (b): function() {}" will too, since function() is a valid JSDoc function type.
33612
+ // - "a ? (b): (function() {})" as well, but inside of a parenthesized type.
33600
33613
  //
33601
33614
  // So we need just a bit of lookahead to ensure that it can only be a signature.
33602
- var hasJSDocFunctionType = type && ts.isJSDocFunctionType(type);
33615
+ var hasJSDocFunctionType = type && (ts.isJSDocFunctionType(type) || ts.isParenthesizedTypeNode(type) && ts.isJSDocFunctionType(type.type));
33603
33616
  if (!allowAmbiguity && token() !== 38 /* EqualsGreaterThanToken */ && (hasJSDocFunctionType || token() !== 18 /* OpenBraceToken */)) {
33604
33617
  // Returning undefined here will cause our caller to rewind to where we started from.
33605
33618
  return undefined;
@@ -37998,7 +38011,11 @@ var ts;
37998
38011
  var ts;
37999
38012
  (function (ts) {
38000
38013
  /* @internal */
38001
- ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean", defaultValueDescription: "false" };
38014
+ ts.compileOnSaveCommandLineOption = {
38015
+ name: "compileOnSave",
38016
+ type: "boolean",
38017
+ defaultValueDescription: false,
38018
+ };
38002
38019
  var jsxOptionMap = new ts.Map(ts.getEntries({
38003
38020
  "preserve": 1 /* Preserve */,
38004
38021
  "react-native": 3 /* ReactNative */,
@@ -38112,6 +38129,7 @@ var ts;
38112
38129
  })),
38113
38130
  category: ts.Diagnostics.Watch_and_Build_Modes,
38114
38131
  description: ts.Diagnostics.Specify_how_the_TypeScript_watch_mode_works,
38132
+ defaultValueDescription: ts.WatchFileKind.UseFsEvents,
38115
38133
  },
38116
38134
  {
38117
38135
  name: "watchDirectory",
@@ -38123,6 +38141,7 @@ var ts;
38123
38141
  })),
38124
38142
  category: ts.Diagnostics.Watch_and_Build_Modes,
38125
38143
  description: ts.Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,
38144
+ defaultValueDescription: ts.WatchDirectoryKind.UseFsEvents,
38126
38145
  },
38127
38146
  {
38128
38147
  name: "fallbackPolling",
@@ -38134,13 +38153,14 @@ var ts;
38134
38153
  })),
38135
38154
  category: ts.Diagnostics.Watch_and_Build_Modes,
38136
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,
38137
38157
  },
38138
38158
  {
38139
38159
  name: "synchronousWatchDirectory",
38140
38160
  type: "boolean",
38141
38161
  category: ts.Diagnostics.Watch_and_Build_Modes,
38142
38162
  description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
38143
- defaultValueDescription: "false",
38163
+ defaultValueDescription: false,
38144
38164
  },
38145
38165
  {
38146
38166
  name: "excludeDirectories",
@@ -38176,13 +38196,13 @@ var ts;
38176
38196
  showInSimplifiedHelpView: true,
38177
38197
  category: ts.Diagnostics.Command_line_Options,
38178
38198
  description: ts.Diagnostics.Print_this_message,
38179
- defaultValueDescription: "false",
38199
+ defaultValueDescription: false,
38180
38200
  },
38181
38201
  {
38182
38202
  name: "help",
38183
38203
  shortName: "?",
38184
38204
  type: "boolean",
38185
- defaultValueDescription: "false",
38205
+ defaultValueDescription: false,
38186
38206
  },
38187
38207
  {
38188
38208
  name: "watch",
@@ -38192,7 +38212,7 @@ var ts;
38192
38212
  isCommandLineOnly: true,
38193
38213
  category: ts.Diagnostics.Command_line_Options,
38194
38214
  description: ts.Diagnostics.Watch_input_files,
38195
- defaultValueDescription: "false",
38215
+ defaultValueDescription: false,
38196
38216
  },
38197
38217
  {
38198
38218
  name: "preserveWatchOutput",
@@ -38200,28 +38220,28 @@ var ts;
38200
38220
  showInSimplifiedHelpView: false,
38201
38221
  category: ts.Diagnostics.Output_Formatting,
38202
38222
  description: ts.Diagnostics.Disable_wiping_the_console_in_watch_mode,
38203
- defaultValueDescription: "false",
38223
+ defaultValueDescription: false,
38204
38224
  },
38205
38225
  {
38206
38226
  name: "listFiles",
38207
38227
  type: "boolean",
38208
38228
  category: ts.Diagnostics.Compiler_Diagnostics,
38209
38229
  description: ts.Diagnostics.Print_all_of_the_files_read_during_the_compilation,
38210
- defaultValueDescription: "false"
38230
+ defaultValueDescription: false,
38211
38231
  },
38212
38232
  {
38213
38233
  name: "explainFiles",
38214
38234
  type: "boolean",
38215
38235
  category: ts.Diagnostics.Compiler_Diagnostics,
38216
38236
  description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,
38217
- defaultValueDescription: "false",
38237
+ defaultValueDescription: false,
38218
38238
  },
38219
38239
  {
38220
38240
  name: "listEmittedFiles",
38221
38241
  type: "boolean",
38222
38242
  category: ts.Diagnostics.Compiler_Diagnostics,
38223
38243
  description: ts.Diagnostics.Print_the_names_of_emitted_files_after_a_compilation,
38224
- defaultValueDescription: "false"
38244
+ defaultValueDescription: false,
38225
38245
  },
38226
38246
  {
38227
38247
  name: "pretty",
@@ -38229,28 +38249,28 @@ var ts;
38229
38249
  showInSimplifiedHelpView: true,
38230
38250
  category: ts.Diagnostics.Output_Formatting,
38231
38251
  description: ts.Diagnostics.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,
38232
- defaultValueDescription: "true"
38252
+ defaultValueDescription: true,
38233
38253
  },
38234
38254
  {
38235
38255
  name: "traceResolution",
38236
38256
  type: "boolean",
38237
38257
  category: ts.Diagnostics.Compiler_Diagnostics,
38238
38258
  description: ts.Diagnostics.Log_paths_used_during_the_moduleResolution_process,
38239
- defaultValueDescription: "false"
38259
+ defaultValueDescription: false,
38240
38260
  },
38241
38261
  {
38242
38262
  name: "diagnostics",
38243
38263
  type: "boolean",
38244
38264
  category: ts.Diagnostics.Compiler_Diagnostics,
38245
38265
  description: ts.Diagnostics.Output_compiler_performance_information_after_building,
38246
- defaultValueDescription: "false"
38266
+ defaultValueDescription: false,
38247
38267
  },
38248
38268
  {
38249
38269
  name: "extendedDiagnostics",
38250
38270
  type: "boolean",
38251
38271
  category: ts.Diagnostics.Compiler_Diagnostics,
38252
38272
  description: ts.Diagnostics.Output_more_detailed_compiler_performance_information_after_building,
38253
- defaultValueDescription: "false"
38273
+ defaultValueDescription: false,
38254
38274
  },
38255
38275
  {
38256
38276
  name: "generateCpuProfile",
@@ -38286,7 +38306,7 @@ var ts;
38286
38306
  affectsEmit: true,
38287
38307
  category: ts.Diagnostics.Watch_and_Build_Modes,
38288
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,
38289
- defaultValueDescription: "false",
38309
+ defaultValueDescription: false,
38290
38310
  },
38291
38311
  {
38292
38312
  name: "locale",
@@ -38322,7 +38342,7 @@ var ts;
38322
38342
  showInSimplifiedHelpView: true,
38323
38343
  category: ts.Diagnostics.Language_and_Environment,
38324
38344
  description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
38325
- defaultValueDescription: "ES3"
38345
+ defaultValueDescription: 0 /* ES3 */,
38326
38346
  };
38327
38347
  var commandOptionsWithoutBuild = [
38328
38348
  // CommandLine only options
@@ -38332,7 +38352,7 @@ var ts;
38332
38352
  showInSimplifiedHelpView: true,
38333
38353
  category: ts.Diagnostics.Command_line_Options,
38334
38354
  description: ts.Diagnostics.Show_all_compiler_options,
38335
- defaultValueDescription: "false",
38355
+ defaultValueDescription: false,
38336
38356
  },
38337
38357
  {
38338
38358
  name: "version",
@@ -38341,7 +38361,7 @@ var ts;
38341
38361
  showInSimplifiedHelpView: true,
38342
38362
  category: ts.Diagnostics.Command_line_Options,
38343
38363
  description: ts.Diagnostics.Print_the_compiler_s_version,
38344
- defaultValueDescription: "false",
38364
+ defaultValueDescription: false,
38345
38365
  },
38346
38366
  {
38347
38367
  name: "init",
@@ -38349,7 +38369,7 @@ var ts;
38349
38369
  showInSimplifiedHelpView: true,
38350
38370
  category: ts.Diagnostics.Command_line_Options,
38351
38371
  description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
38352
- defaultValueDescription: "false",
38372
+ defaultValueDescription: false,
38353
38373
  },
38354
38374
  {
38355
38375
  name: "project",
@@ -38368,7 +38388,7 @@ var ts;
38368
38388
  showInSimplifiedHelpView: true,
38369
38389
  category: ts.Diagnostics.Command_line_Options,
38370
38390
  description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,
38371
- defaultValueDescription: "false",
38391
+ defaultValueDescription: false,
38372
38392
  },
38373
38393
  {
38374
38394
  name: "showConfig",
@@ -38377,7 +38397,7 @@ var ts;
38377
38397
  category: ts.Diagnostics.Command_line_Options,
38378
38398
  isCommandLineOnly: true,
38379
38399
  description: ts.Diagnostics.Print_the_final_configuration_instead_of_building,
38380
- defaultValueDescription: "false",
38400
+ defaultValueDescription: false,
38381
38401
  },
38382
38402
  {
38383
38403
  name: "listFilesOnly",
@@ -38387,7 +38407,7 @@ var ts;
38387
38407
  affectsEmit: true,
38388
38408
  isCommandLineOnly: true,
38389
38409
  description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
38390
- defaultValueDescription: "false",
38410
+ defaultValueDescription: false,
38391
38411
  },
38392
38412
  // Basic
38393
38413
  ts.targetOptionDeclaration,
@@ -38414,13 +38434,15 @@ var ts;
38414
38434
  showInSimplifiedHelpView: true,
38415
38435
  category: ts.Diagnostics.Modules,
38416
38436
  description: ts.Diagnostics.Specify_what_module_code_is_generated,
38437
+ defaultValueDescription: undefined,
38417
38438
  },
38418
38439
  {
38419
38440
  name: "lib",
38420
38441
  type: "list",
38421
38442
  element: {
38422
38443
  name: "lib",
38423
- type: ts.libMap
38444
+ type: ts.libMap,
38445
+ defaultValueDescription: undefined,
38424
38446
  },
38425
38447
  affectsProgramStructure: true,
38426
38448
  showInSimplifiedHelpView: true,
@@ -38435,7 +38457,7 @@ var ts;
38435
38457
  showInSimplifiedHelpView: true,
38436
38458
  category: ts.Diagnostics.JavaScript_Support,
38437
38459
  description: ts.Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
38438
- defaultValueDescription: "false"
38460
+ defaultValueDescription: false,
38439
38461
  },
38440
38462
  {
38441
38463
  name: "checkJs",
@@ -38443,7 +38465,7 @@ var ts;
38443
38465
  showInSimplifiedHelpView: true,
38444
38466
  category: ts.Diagnostics.JavaScript_Support,
38445
38467
  description: ts.Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
38446
- defaultValueDescription: "false"
38468
+ defaultValueDescription: false,
38447
38469
  },
38448
38470
  {
38449
38471
  name: "jsx",
@@ -38455,7 +38477,7 @@ var ts;
38455
38477
  showInSimplifiedHelpView: true,
38456
38478
  category: ts.Diagnostics.Language_and_Environment,
38457
38479
  description: ts.Diagnostics.Specify_what_JSX_code_is_generated,
38458
- defaultValueDescription: "undefined"
38480
+ defaultValueDescription: undefined,
38459
38481
  },
38460
38482
  {
38461
38483
  name: "declaration",
@@ -38475,7 +38497,7 @@ var ts;
38475
38497
  showInSimplifiedHelpView: true,
38476
38498
  category: ts.Diagnostics.Emit,
38477
38499
  transpileOptionValue: undefined,
38478
- defaultValueDescription: "false",
38500
+ defaultValueDescription: false,
38479
38501
  description: ts.Diagnostics.Create_sourcemaps_for_d_ts_files
38480
38502
  },
38481
38503
  {
@@ -38486,7 +38508,7 @@ var ts;
38486
38508
  category: ts.Diagnostics.Emit,
38487
38509
  description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
38488
38510
  transpileOptionValue: undefined,
38489
- defaultValueDescription: "false",
38511
+ defaultValueDescription: false,
38490
38512
  },
38491
38513
  {
38492
38514
  name: "sourceMap",
@@ -38494,7 +38516,7 @@ var ts;
38494
38516
  affectsEmit: true,
38495
38517
  showInSimplifiedHelpView: true,
38496
38518
  category: ts.Diagnostics.Emit,
38497
- defaultValueDescription: "false",
38519
+ defaultValueDescription: false,
38498
38520
  description: ts.Diagnostics.Create_source_map_files_for_emitted_JavaScript_files,
38499
38521
  },
38500
38522
  {
@@ -38535,7 +38557,7 @@ var ts;
38535
38557
  isTSConfigOnly: true,
38536
38558
  category: ts.Diagnostics.Projects,
38537
38559
  transpileOptionValue: undefined,
38538
- defaultValueDescription: "false",
38560
+ defaultValueDescription: false,
38539
38561
  description: ts.Diagnostics.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references,
38540
38562
  },
38541
38563
  {
@@ -38555,7 +38577,7 @@ var ts;
38555
38577
  affectsEmit: true,
38556
38578
  showInSimplifiedHelpView: true,
38557
38579
  category: ts.Diagnostics.Emit,
38558
- defaultValueDescription: "false",
38580
+ defaultValueDescription: false,
38559
38581
  description: ts.Diagnostics.Disable_emitting_comments,
38560
38582
  },
38561
38583
  {
@@ -38565,7 +38587,7 @@ var ts;
38565
38587
  category: ts.Diagnostics.Emit,
38566
38588
  description: ts.Diagnostics.Disable_emitting_files_from_a_compilation,
38567
38589
  transpileOptionValue: undefined,
38568
- defaultValueDescription: "false"
38590
+ defaultValueDescription: false,
38569
38591
  },
38570
38592
  {
38571
38593
  name: "importHelpers",
@@ -38573,7 +38595,7 @@ var ts;
38573
38595
  affectsEmit: true,
38574
38596
  category: ts.Diagnostics.Emit,
38575
38597
  description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
38576
- defaultValueDescription: "false"
38598
+ defaultValueDescription: false,
38577
38599
  },
38578
38600
  {
38579
38601
  name: "importsNotUsedAsValues",
@@ -38585,7 +38607,8 @@ var ts;
38585
38607
  affectsEmit: true,
38586
38608
  affectsSemanticDiagnostics: true,
38587
38609
  category: ts.Diagnostics.Emit,
38588
- 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 */,
38589
38612
  },
38590
38613
  {
38591
38614
  name: "downlevelIteration",
@@ -38593,7 +38616,7 @@ var ts;
38593
38616
  affectsEmit: true,
38594
38617
  category: ts.Diagnostics.Emit,
38595
38618
  description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
38596
- defaultValueDescription: "false"
38619
+ defaultValueDescription: false,
38597
38620
  },
38598
38621
  {
38599
38622
  name: "isolatedModules",
@@ -38601,7 +38624,7 @@ var ts;
38601
38624
  category: ts.Diagnostics.Interop_Constraints,
38602
38625
  description: ts.Diagnostics.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,
38603
38626
  transpileOptionValue: true,
38604
- defaultValueDescription: "false"
38627
+ defaultValueDescription: false,
38605
38628
  },
38606
38629
  // Strict Type Checks
38607
38630
  {
@@ -38612,7 +38635,7 @@ var ts;
38612
38635
  showInSimplifiedHelpView: true,
38613
38636
  category: ts.Diagnostics.Type_Checking,
38614
38637
  description: ts.Diagnostics.Enable_all_strict_type_checking_options,
38615
- defaultValueDescription: "false"
38638
+ defaultValueDescription: false,
38616
38639
  },
38617
38640
  {
38618
38641
  name: "noImplicitAny",
@@ -38673,7 +38696,7 @@ var ts;
38673
38696
  strictFlag: true,
38674
38697
  category: ts.Diagnostics.Type_Checking,
38675
38698
  description: ts.Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
38676
- defaultValueDescription: "false",
38699
+ defaultValueDescription: false,
38677
38700
  },
38678
38701
  {
38679
38702
  name: "alwaysStrict",
@@ -38691,7 +38714,7 @@ var ts;
38691
38714
  affectsSemanticDiagnostics: true,
38692
38715
  category: ts.Diagnostics.Type_Checking,
38693
38716
  description: ts.Diagnostics.Enable_error_reporting_when_a_local_variables_aren_t_read,
38694
- defaultValueDescription: "false"
38717
+ defaultValueDescription: false,
38695
38718
  },
38696
38719
  {
38697
38720
  name: "noUnusedParameters",
@@ -38699,7 +38722,7 @@ var ts;
38699
38722
  affectsSemanticDiagnostics: true,
38700
38723
  category: ts.Diagnostics.Type_Checking,
38701
38724
  description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
38702
- defaultValueDescription: "false"
38725
+ defaultValueDescription: false,
38703
38726
  },
38704
38727
  {
38705
38728
  name: "exactOptionalPropertyTypes",
@@ -38707,7 +38730,7 @@ var ts;
38707
38730
  affectsSemanticDiagnostics: true,
38708
38731
  category: ts.Diagnostics.Type_Checking,
38709
38732
  description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
38710
- defaultValueDescription: "false",
38733
+ defaultValueDescription: false,
38711
38734
  },
38712
38735
  {
38713
38736
  name: "noImplicitReturns",
@@ -38715,7 +38738,7 @@ var ts;
38715
38738
  affectsSemanticDiagnostics: true,
38716
38739
  category: ts.Diagnostics.Type_Checking,
38717
38740
  description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
38718
- defaultValueDescription: "false"
38741
+ defaultValueDescription: false,
38719
38742
  },
38720
38743
  {
38721
38744
  name: "noFallthroughCasesInSwitch",
@@ -38724,7 +38747,7 @@ var ts;
38724
38747
  affectsSemanticDiagnostics: true,
38725
38748
  category: ts.Diagnostics.Type_Checking,
38726
38749
  description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
38727
- defaultValueDescription: "false",
38750
+ defaultValueDescription: false,
38728
38751
  },
38729
38752
  {
38730
38753
  name: "noUncheckedIndexedAccess",
@@ -38732,7 +38755,7 @@ var ts;
38732
38755
  affectsSemanticDiagnostics: true,
38733
38756
  category: ts.Diagnostics.Type_Checking,
38734
38757
  description: ts.Diagnostics.Include_undefined_in_index_signature_results,
38735
- defaultValueDescription: "false",
38758
+ defaultValueDescription: false,
38736
38759
  },
38737
38760
  {
38738
38761
  name: "noImplicitOverride",
@@ -38740,7 +38763,7 @@ var ts;
38740
38763
  affectsSemanticDiagnostics: true,
38741
38764
  category: ts.Diagnostics.Type_Checking,
38742
38765
  description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
38743
- defaultValueDescription: "false",
38766
+ defaultValueDescription: false,
38744
38767
  },
38745
38768
  {
38746
38769
  name: "noPropertyAccessFromIndexSignature",
@@ -38748,7 +38771,7 @@ var ts;
38748
38771
  showInSimplifiedHelpView: false,
38749
38772
  category: ts.Diagnostics.Type_Checking,
38750
38773
  description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
38751
- defaultValueDescription: "false"
38774
+ defaultValueDescription: false,
38752
38775
  },
38753
38776
  // Module Resolution
38754
38777
  {
@@ -38842,14 +38865,14 @@ var ts;
38842
38865
  showInSimplifiedHelpView: true,
38843
38866
  category: ts.Diagnostics.Interop_Constraints,
38844
38867
  description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
38845
- defaultValueDescription: "false"
38868
+ defaultValueDescription: false,
38846
38869
  },
38847
38870
  {
38848
38871
  name: "preserveSymlinks",
38849
38872
  type: "boolean",
38850
38873
  category: ts.Diagnostics.Interop_Constraints,
38851
38874
  description: ts.Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,
38852
- defaultValueDescription: "false",
38875
+ defaultValueDescription: false,
38853
38876
  },
38854
38877
  {
38855
38878
  name: "allowUmdGlobalAccess",
@@ -38857,7 +38880,7 @@ var ts;
38857
38880
  affectsSemanticDiagnostics: true,
38858
38881
  category: ts.Diagnostics.Modules,
38859
38882
  description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
38860
- defaultValueDescription: "false"
38883
+ defaultValueDescription: false,
38861
38884
  },
38862
38885
  // Source Maps
38863
38886
  {
@@ -38882,7 +38905,7 @@ var ts;
38882
38905
  affectsEmit: true,
38883
38906
  category: ts.Diagnostics.Emit,
38884
38907
  description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
38885
- defaultValueDescription: "false"
38908
+ defaultValueDescription: false,
38886
38909
  },
38887
38910
  {
38888
38911
  name: "inlineSources",
@@ -38890,7 +38913,7 @@ var ts;
38890
38913
  affectsEmit: true,
38891
38914
  category: ts.Diagnostics.Emit,
38892
38915
  description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
38893
- defaultValueDescription: "false"
38916
+ defaultValueDescription: false,
38894
38917
  },
38895
38918
  // Experimental
38896
38919
  {
@@ -38899,7 +38922,7 @@ var ts;
38899
38922
  affectsSemanticDiagnostics: true,
38900
38923
  category: ts.Diagnostics.Language_and_Environment,
38901
38924
  description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
38902
- defaultValueDescription: "false",
38925
+ defaultValueDescription: false,
38903
38926
  },
38904
38927
  {
38905
38928
  name: "emitDecoratorMetadata",
@@ -38908,7 +38931,7 @@ var ts;
38908
38931
  affectsEmit: true,
38909
38932
  category: ts.Diagnostics.Language_and_Environment,
38910
38933
  description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
38911
- defaultValueDescription: "false",
38934
+ defaultValueDescription: false,
38912
38935
  },
38913
38936
  // Advanced
38914
38937
  {
@@ -38940,7 +38963,7 @@ var ts;
38940
38963
  affectsModuleResolution: true,
38941
38964
  category: ts.Diagnostics.Modules,
38942
38965
  description: ts.Diagnostics.Enable_importing_json_files,
38943
- defaultValueDescription: "false"
38966
+ defaultValueDescription: false,
38944
38967
  },
38945
38968
  {
38946
38969
  name: "out",
@@ -38966,7 +38989,7 @@ var ts;
38966
38989
  type: "boolean",
38967
38990
  category: ts.Diagnostics.Completeness,
38968
38991
  description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
38969
- defaultValueDescription: "false",
38992
+ defaultValueDescription: false,
38970
38993
  },
38971
38994
  {
38972
38995
  name: "charset",
@@ -38981,7 +39004,7 @@ var ts;
38981
39004
  affectsEmit: true,
38982
39005
  category: ts.Diagnostics.Emit,
38983
39006
  description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
38984
- defaultValueDescription: "false"
39007
+ defaultValueDescription: false,
38985
39008
  },
38986
39009
  {
38987
39010
  name: "newLine",
@@ -39001,7 +39024,7 @@ var ts;
39001
39024
  affectsSemanticDiagnostics: true,
39002
39025
  category: ts.Diagnostics.Output_Formatting,
39003
39026
  description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
39004
- defaultValueDescription: "false"
39027
+ defaultValueDescription: false,
39005
39028
  },
39006
39029
  {
39007
39030
  name: "noLib",
@@ -39012,7 +39035,7 @@ var ts;
39012
39035
  // We are not returning a sourceFile for lib file when asked by the program,
39013
39036
  // so pass --noLib to avoid reporting a file not found error.
39014
39037
  transpileOptionValue: true,
39015
- defaultValueDescription: "false"
39038
+ defaultValueDescription: false,
39016
39039
  },
39017
39040
  {
39018
39041
  name: "noResolve",
@@ -39023,7 +39046,7 @@ var ts;
39023
39046
  // We are not doing a full typecheck, we are not resolving the whole context,
39024
39047
  // so pass --noResolve to avoid reporting missing file errors.
39025
39048
  transpileOptionValue: true,
39026
- defaultValueDescription: "false"
39049
+ defaultValueDescription: false,
39027
39050
  },
39028
39051
  {
39029
39052
  name: "stripInternal",
@@ -39031,7 +39054,7 @@ var ts;
39031
39054
  affectsEmit: true,
39032
39055
  category: ts.Diagnostics.Emit,
39033
39056
  description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
39034
- defaultValueDescription: "false",
39057
+ defaultValueDescription: false,
39035
39058
  },
39036
39059
  {
39037
39060
  name: "disableSizeLimit",
@@ -39039,7 +39062,7 @@ var ts;
39039
39062
  affectsProgramStructure: true,
39040
39063
  category: ts.Diagnostics.Editor_Support,
39041
39064
  description: ts.Diagnostics.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,
39042
- defaultValueDescription: "false"
39065
+ defaultValueDescription: false,
39043
39066
  },
39044
39067
  {
39045
39068
  name: "disableSourceOfProjectReferenceRedirect",
@@ -39047,7 +39070,7 @@ var ts;
39047
39070
  isTSConfigOnly: true,
39048
39071
  category: ts.Diagnostics.Projects,
39049
39072
  description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,
39050
- defaultValueDescription: "false",
39073
+ defaultValueDescription: false,
39051
39074
  },
39052
39075
  {
39053
39076
  name: "disableSolutionSearching",
@@ -39055,7 +39078,7 @@ var ts;
39055
39078
  isTSConfigOnly: true,
39056
39079
  category: ts.Diagnostics.Projects,
39057
39080
  description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,
39058
- defaultValueDescription: "false",
39081
+ defaultValueDescription: false,
39059
39082
  },
39060
39083
  {
39061
39084
  name: "disableReferencedProjectLoad",
@@ -39063,7 +39086,7 @@ var ts;
39063
39086
  isTSConfigOnly: true,
39064
39087
  category: ts.Diagnostics.Projects,
39065
39088
  description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,
39066
- defaultValueDescription: "false",
39089
+ defaultValueDescription: false,
39067
39090
  },
39068
39091
  {
39069
39092
  name: "noImplicitUseStrict",
@@ -39071,7 +39094,7 @@ var ts;
39071
39094
  affectsSemanticDiagnostics: true,
39072
39095
  category: ts.Diagnostics.Backwards_Compatibility,
39073
39096
  description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
39074
- defaultValueDescription: "false"
39097
+ defaultValueDescription: false,
39075
39098
  },
39076
39099
  {
39077
39100
  name: "noEmitHelpers",
@@ -39079,7 +39102,7 @@ var ts;
39079
39102
  affectsEmit: true,
39080
39103
  category: ts.Diagnostics.Emit,
39081
39104
  description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
39082
- defaultValueDescription: "false"
39105
+ defaultValueDescription: false,
39083
39106
  },
39084
39107
  {
39085
39108
  name: "noEmitOnError",
@@ -39088,7 +39111,7 @@ var ts;
39088
39111
  category: ts.Diagnostics.Emit,
39089
39112
  transpileOptionValue: undefined,
39090
39113
  description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
39091
- defaultValueDescription: "false"
39114
+ defaultValueDescription: false,
39092
39115
  },
39093
39116
  {
39094
39117
  name: "preserveConstEnums",
@@ -39096,7 +39119,7 @@ var ts;
39096
39119
  affectsEmit: true,
39097
39120
  category: ts.Diagnostics.Emit,
39098
39121
  description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
39099
- defaultValueDescription: "false",
39122
+ defaultValueDescription: false,
39100
39123
  },
39101
39124
  {
39102
39125
  name: "declarationDir",
@@ -39113,7 +39136,7 @@ var ts;
39113
39136
  type: "boolean",
39114
39137
  category: ts.Diagnostics.Completeness,
39115
39138
  description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
39116
- defaultValueDescription: "false"
39139
+ defaultValueDescription: false,
39117
39140
  },
39118
39141
  {
39119
39142
  name: "allowUnusedLabels",
@@ -39122,7 +39145,7 @@ var ts;
39122
39145
  affectsSemanticDiagnostics: true,
39123
39146
  category: ts.Diagnostics.Type_Checking,
39124
39147
  description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
39125
- defaultValueDescription: "undefined"
39148
+ defaultValueDescription: undefined,
39126
39149
  },
39127
39150
  {
39128
39151
  name: "allowUnreachableCode",
@@ -39131,7 +39154,7 @@ var ts;
39131
39154
  affectsSemanticDiagnostics: true,
39132
39155
  category: ts.Diagnostics.Type_Checking,
39133
39156
  description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
39134
- defaultValueDescription: "undefined"
39157
+ defaultValueDescription: undefined,
39135
39158
  },
39136
39159
  {
39137
39160
  name: "suppressExcessPropertyErrors",
@@ -39139,7 +39162,7 @@ var ts;
39139
39162
  affectsSemanticDiagnostics: true,
39140
39163
  category: ts.Diagnostics.Backwards_Compatibility,
39141
39164
  description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
39142
- defaultValueDescription: "false"
39165
+ defaultValueDescription: false,
39143
39166
  },
39144
39167
  {
39145
39168
  name: "suppressImplicitAnyIndexErrors",
@@ -39147,7 +39170,7 @@ var ts;
39147
39170
  affectsSemanticDiagnostics: true,
39148
39171
  category: ts.Diagnostics.Backwards_Compatibility,
39149
39172
  description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
39150
- defaultValueDescription: "false"
39173
+ defaultValueDescription: false,
39151
39174
  },
39152
39175
  {
39153
39176
  name: "forceConsistentCasingInFileNames",
@@ -39155,7 +39178,7 @@ var ts;
39155
39178
  affectsModuleResolution: true,
39156
39179
  category: ts.Diagnostics.Interop_Constraints,
39157
39180
  description: ts.Diagnostics.Ensure_that_casing_is_correct_in_imports,
39158
- defaultValueDescription: "false"
39181
+ defaultValueDescription: false,
39159
39182
  },
39160
39183
  {
39161
39184
  name: "maxNodeModuleJsDepth",
@@ -39163,7 +39186,7 @@ var ts;
39163
39186
  affectsModuleResolution: true,
39164
39187
  category: ts.Diagnostics.JavaScript_Support,
39165
39188
  description: ts.Diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,
39166
- defaultValueDescription: "0"
39189
+ defaultValueDescription: 0,
39167
39190
  },
39168
39191
  {
39169
39192
  name: "noStrictGenericChecks",
@@ -39171,7 +39194,7 @@ var ts;
39171
39194
  affectsSemanticDiagnostics: true,
39172
39195
  category: ts.Diagnostics.Backwards_Compatibility,
39173
39196
  description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
39174
- defaultValueDescription: "false"
39197
+ defaultValueDescription: false,
39175
39198
  },
39176
39199
  {
39177
39200
  name: "useDefineForClassFields",
@@ -39188,14 +39211,14 @@ var ts;
39188
39211
  affectsEmit: true,
39189
39212
  category: ts.Diagnostics.Emit,
39190
39213
  description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
39191
- defaultValueDescription: "false",
39214
+ defaultValueDescription: false,
39192
39215
  },
39193
39216
  {
39194
39217
  name: "keyofStringsOnly",
39195
39218
  type: "boolean",
39196
39219
  category: ts.Diagnostics.Backwards_Compatibility,
39197
39220
  description: ts.Diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,
39198
- defaultValueDescription: "false"
39221
+ defaultValueDescription: false,
39199
39222
  },
39200
39223
  {
39201
39224
  // A list of plugins to load in the language service
@@ -39237,7 +39260,7 @@ var ts;
39237
39260
  category: ts.Diagnostics.Command_line_Options,
39238
39261
  description: ts.Diagnostics.Enable_verbose_logging,
39239
39262
  type: "boolean",
39240
- defaultValueDescription: "false",
39263
+ defaultValueDescription: false,
39241
39264
  },
39242
39265
  {
39243
39266
  name: "dry",
@@ -39245,7 +39268,7 @@ var ts;
39245
39268
  category: ts.Diagnostics.Command_line_Options,
39246
39269
  description: ts.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,
39247
39270
  type: "boolean",
39248
- defaultValueDescription: "false",
39271
+ defaultValueDescription: false,
39249
39272
  },
39250
39273
  {
39251
39274
  name: "force",
@@ -39253,14 +39276,14 @@ var ts;
39253
39276
  category: ts.Diagnostics.Command_line_Options,
39254
39277
  description: ts.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,
39255
39278
  type: "boolean",
39256
- defaultValueDescription: "false",
39279
+ defaultValueDescription: false,
39257
39280
  },
39258
39281
  {
39259
39282
  name: "clean",
39260
39283
  category: ts.Diagnostics.Command_line_Options,
39261
39284
  description: ts.Diagnostics.Delete_the_outputs_of_all_projects,
39262
39285
  type: "boolean",
39263
- defaultValueDescription: "false",
39286
+ defaultValueDescription: false,
39264
39287
  }
39265
39288
  ];
39266
39289
  /* @internal */
@@ -39273,12 +39296,12 @@ var ts;
39273
39296
  */
39274
39297
  name: "enableAutoDiscovery",
39275
39298
  type: "boolean",
39276
- defaultValueDescription: "false",
39299
+ defaultValueDescription: false,
39277
39300
  },
39278
39301
  {
39279
39302
  name: "enable",
39280
39303
  type: "boolean",
39281
- defaultValueDescription: "false",
39304
+ defaultValueDescription: false,
39282
39305
  },
39283
39306
  {
39284
39307
  name: "include",
@@ -39299,7 +39322,7 @@ var ts;
39299
39322
  {
39300
39323
  name: "disableFilenameBasedTypeAcquisition",
39301
39324
  type: "boolean",
39302
- defaultValueDescription: "false",
39325
+ defaultValueDescription: false,
39303
39326
  },
39304
39327
  ];
39305
39328
  /*@internal*/
@@ -46818,6 +46841,7 @@ var ts;
46818
46841
  getIndexInfosOfType: getIndexInfosOfType,
46819
46842
  getSignaturesOfType: getSignaturesOfType,
46820
46843
  getIndexTypeOfType: function (type, kind) { return getIndexTypeOfType(type, kind === 0 /* String */ ? stringType : numberType); },
46844
+ getIndexType: function (type) { return getIndexType(type); },
46821
46845
  getBaseTypes: getBaseTypes,
46822
46846
  getBaseTypeOfLiteralType: getBaseTypeOfLiteralType,
46823
46847
  getWidenedType: getWidenedType,
@@ -48075,11 +48099,12 @@ var ts;
48075
48099
  *
48076
48100
  * @param isUse If true, this will count towards --noUnusedLocals / --noUnusedParameters.
48077
48101
  */
48078
- function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
48102
+ function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions) {
48079
48103
  if (excludeGlobals === void 0) { excludeGlobals = false; }
48080
- return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol);
48104
+ if (getSpellingSuggstions === void 0) { getSpellingSuggstions = true; }
48105
+ return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggstions, getSymbol);
48081
48106
  }
48082
- function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
48107
+ function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSpellingSuggestions, lookup) {
48083
48108
  var _a, _b, _c;
48084
48109
  var originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location
48085
48110
  var result;
@@ -48396,7 +48421,7 @@ var ts;
48396
48421
  }
48397
48422
  }
48398
48423
  if (!result) {
48399
- if (nameNotFoundMessage) {
48424
+ if (nameNotFoundMessage && produceDiagnostics) {
48400
48425
  if (!errorLocation ||
48401
48426
  !checkAndReportErrorForMissingPrefix(errorLocation, name, nameArg) && // TODO: GH#18217
48402
48427
  !checkAndReportErrorForExtendingInterface(errorLocation) &&
@@ -48406,7 +48431,7 @@ var ts;
48406
48431
  !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
48407
48432
  !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
48408
48433
  var suggestion = void 0;
48409
- if (suggestionCount < maximumSuggestionCount) {
48434
+ if (getSpellingSuggestions && suggestionCount < maximumSuggestionCount) {
48410
48435
  suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
48411
48436
  var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
48412
48437
  if (isGlobalScopeAugmentationDeclaration) {
@@ -48442,7 +48467,7 @@ var ts;
48442
48467
  return undefined;
48443
48468
  }
48444
48469
  // Perform extra checks only if error reporting was requested
48445
- if (nameNotFoundMessage) {
48470
+ if (nameNotFoundMessage && produceDiagnostics) {
48446
48471
  if (propertyWithInvalidInitializer && !(ts.getEmitScriptTarget(compilerOptions) === 99 /* ESNext */ && useDefineForClassFields)) {
48447
48472
  // We have a match, but the reference occurred within a property initializer and the identifier also binds
48448
48473
  // to a local variable in the constructor where the code will be emitted. Note that this is actually allowed
@@ -50918,7 +50943,7 @@ var ts;
50918
50943
  context.approximateLength += 6;
50919
50944
  return ts.factory.createKeywordTypeNode(147 /* ObjectKeyword */);
50920
50945
  }
50921
- if (isThisTypeParameter(type)) {
50946
+ if (ts.isThisTypeParameter(type)) {
50922
50947
  if (context.flags & 4194304 /* InObjectTypeLiteral */) {
50923
50948
  if (!context.encounteredError && !(context.flags & 32768 /* AllowThisInObjectLiteral */)) {
50924
50949
  context.encounteredError = true;
@@ -58863,7 +58888,7 @@ var ts;
58863
58888
  }
58864
58889
  function getGlobalSymbol(name, meaning, diagnostic) {
58865
58890
  // Don't track references for global symbols anyway, so value if `isReference` is arbitrary
58866
- return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false);
58891
+ return resolveName(undefined, name, meaning, diagnostic, name, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ false);
58867
58892
  }
58868
58893
  function getGlobalType(name, arity, reportErrors) {
58869
58894
  var symbol = getGlobalTypeSymbol(name, reportErrors);
@@ -60442,9 +60467,6 @@ var ts;
60442
60467
  return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 8388608 /* IsGenericObjectType */ : 0) |
60443
60468
  (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 16777216 /* IsGenericIndexType */ : 0);
60444
60469
  }
60445
- function isThisTypeParameter(type) {
60446
- return !!(type.flags & 262144 /* TypeParameter */ && type.isThisType);
60447
- }
60448
60470
  function getSimplifiedType(type, writing) {
60449
60471
  return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) :
60450
60472
  type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) :
@@ -65642,7 +65664,7 @@ var ts;
65642
65664
  // flags for the string, number, boolean, "", 0, false, void, undefined, or null types respectively. Returns
65643
65665
  // no flags for all other types (including non-falsy literal types).
65644
65666
  function getFalsyFlags(type) {
65645
- return type.flags & 1048576 /* Union */ ? getFalsyFlagsOfTypes(type.types) :
65667
+ return type.flags & 3145728 /* UnionOrIntersection */ ? getFalsyFlagsOfTypes(type.types) :
65646
65668
  type.flags & 128 /* StringLiteral */ ? type.value === "" ? 128 /* StringLiteral */ : 0 :
65647
65669
  type.flags & 256 /* NumberLiteral */ ? type.value === 0 ? 256 /* NumberLiteral */ : 0 :
65648
65670
  type.flags & 2048 /* BigIntLiteral */ ? isZeroBigInt(type) ? 2048 /* BigIntLiteral */ : 0 :
@@ -67258,6 +67280,11 @@ var ts;
67258
67280
  case "BigInt64Array":
67259
67281
  case "BigUint64Array":
67260
67282
  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;
67283
+ case "await":
67284
+ if (ts.isCallExpression(node.parent)) {
67285
+ return ts.Diagnostics.Cannot_find_name_0_Did_you_mean_to_write_this_in_an_async_function;
67286
+ }
67287
+ // falls through
67261
67288
  default:
67262
67289
  if (node.parent.kind === 295 /* ShorthandPropertyAssignment */) {
67263
67290
  return ts.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;
@@ -68815,7 +68842,7 @@ var ts;
68815
68842
  function narrowByInKeyword(type, name, assumeTrue) {
68816
68843
  if (type.flags & 1048576 /* Union */
68817
68844
  || type.flags & 524288 /* Object */ && declaredType !== type
68818
- || isThisTypeParameter(type)
68845
+ || ts.isThisTypeParameter(type)
68819
68846
  || type.flags & 2097152 /* Intersection */ && ts.every(type.types, function (t) { return t.symbol !== globalThisSymbol; })) {
68820
68847
  return filterType(type, function (t) { return isTypePresencePossible(t, name, assumeTrue); });
68821
68848
  }
@@ -71635,15 +71662,9 @@ var ts;
71635
71662
  }
71636
71663
  }
71637
71664
  function isValidSpreadType(type) {
71638
- if (type.flags & 465829888 /* Instantiable */) {
71639
- var constraint = getBaseConstraintOfType(type);
71640
- if (constraint !== undefined) {
71641
- return isValidSpreadType(constraint);
71642
- }
71643
- }
71644
- return !!(type.flags & (1 /* Any */ | 67108864 /* NonPrimitive */ | 524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) ||
71645
- getFalsyFlags(type) & 117632 /* DefinitelyFalsy */ && isValidSpreadType(removeDefinitelyFalsyTypes(type)) ||
71646
- type.flags & 3145728 /* UnionOrIntersection */ && ts.every(type.types, isValidSpreadType));
71665
+ var t = removeDefinitelyFalsyTypes(mapType(type, getBaseConstraintOrType));
71666
+ return !!(t.flags & (1 /* Any */ | 67108864 /* NonPrimitive */ | 524288 /* Object */ | 58982400 /* InstantiableNonPrimitive */) ||
71667
+ t.flags & 3145728 /* UnionOrIntersection */ && ts.every(t.types, isValidSpreadType));
71647
71668
  }
71648
71669
  function checkJsxSelfClosingElementDeferred(node) {
71649
71670
  checkJsxOpeningLikeElementOrOpeningFragment(node);
@@ -72594,7 +72615,7 @@ var ts;
72594
72615
  }
72595
72616
  var propType;
72596
72617
  if (!prop) {
72597
- var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || isThisTypeParameter(leftType)) ?
72618
+ var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 /* None */ || !isGenericObjectType(leftType) || ts.isThisTypeParameter(leftType)) ?
72598
72619
  getApplicableIndexInfoForName(apparentType, right.escapedText) : undefined;
72599
72620
  if (!(indexInfo && indexInfo.type)) {
72600
72621
  var isUncheckedJS = isUncheckedJSSuggestion(node, leftType.symbol, /*excludeClasses*/ true);
@@ -72611,7 +72632,7 @@ var ts;
72611
72632
  return anyType;
72612
72633
  }
72613
72634
  if (right.escapedText && !checkAndReportErrorForExtendingInterface(node)) {
72614
- reportNonexistentProperty(right, isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
72635
+ reportNonexistentProperty(right, ts.isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
72615
72636
  }
72616
72637
  return errorType;
72617
72638
  }
@@ -72904,7 +72925,7 @@ var ts;
72904
72925
  }
72905
72926
  function getSuggestedSymbolForNonexistentSymbol(location, outerName, meaning) {
72906
72927
  ts.Debug.assert(outerName !== undefined, "outername should always be defined");
72907
- var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, function (symbols, name, meaning) {
72928
+ var result = resolveNameHelper(location, outerName, meaning, /*nameNotFoundMessage*/ undefined, outerName, /*isUse*/ false, /*excludeGlobals*/ false, /*getSpellingSuggestions*/ true, function (symbols, name, meaning) {
72908
72929
  ts.Debug.assertEqual(outerName, name, "name should equal outerName");
72909
72930
  var symbol = getSymbol(symbols, name, meaning);
72910
72931
  // 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
@@ -73150,7 +73171,7 @@ var ts;
73150
73171
  }
73151
73172
  var effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType;
73152
73173
  var accessFlags = ts.isAssignmentTarget(node) ?
73153
- 4 /* Writing */ | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 2 /* NoIndexSignatures */ : 0) :
73174
+ 4 /* Writing */ | (isGenericObjectType(objectType) && !ts.isThisTypeParameter(objectType) ? 2 /* NoIndexSignatures */ : 0) :
73154
73175
  32 /* ExpressionPosition */;
73155
73176
  var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, accessFlags, node) || errorType;
73156
73177
  return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, getNodeLinks(node).resolvedSymbol, indexedAccessType, indexExpression, checkMode), node);
@@ -86612,18 +86633,22 @@ var ts;
86612
86633
  return false;
86613
86634
  }
86614
86635
  function checkNumericLiteralValueSize(node) {
86636
+ // We should test against `getTextOfNode(node)` rather than `node.text`, because `node.text` for large numeric literals can contain "."
86637
+ // e.g. `node.text` for numeric literal `1100000000000000000000` is `1.1e21`.
86638
+ var isFractional = ts.getTextOfNode(node).indexOf(".") !== -1;
86639
+ var isScientific = node.numericLiteralFlags & 16 /* Scientific */;
86615
86640
  // Scientific notation (e.g. 2e54 and 1e00000000010) can't be converted to bigint
86616
- // Literals with 15 or fewer characters aren't long enough to reach past 2^53 - 1
86617
86641
  // Fractional numbers (e.g. 9000000000000000.001) are inherently imprecise anyway
86618
- if (node.numericLiteralFlags & 16 /* Scientific */ || node.text.length <= 15 || node.text.indexOf(".") !== -1) {
86642
+ if (isFractional || isScientific) {
86619
86643
  return;
86620
86644
  }
86621
- // We can't rely on the runtime to accurately store and compare extremely large numeric values
86622
- // Even for internal use, we use getTextOfNode: https://github.com/microsoft/TypeScript/issues/33298
86623
- // Thus, if the runtime claims a too-large number is lower than Number.MAX_SAFE_INTEGER,
86624
- // it's likely addition operations on it will fail too
86625
- var apparentValue = +ts.getTextOfNode(node);
86626
- if (apparentValue <= Math.pow(2, 53) - 1 && apparentValue + 1 > apparentValue) {
86645
+ // Here `node` is guaranteed to be a numeric literal representing an integer.
86646
+ // We need to judge whether the integer `node` represents is <= 2 ** 53 - 1, which can be accomplished by comparing to `value` defined below because:
86647
+ // 1) when `node` represents an integer <= 2 ** 53 - 1, `node.text` is its exact string representation and thus `value` precisely represents the integer.
86648
+ // 2) otherwise, although `node.text` may be imprecise string representation, its mathematical value and consequently `value` cannot be less than 2 ** 53,
86649
+ // thus the result of the predicate won't be affected.
86650
+ var value = +node.text;
86651
+ if (value <= Math.pow(2, 53) - 1) {
86627
86652
  return;
86628
86653
  }
86629
86654
  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));
@@ -90085,7 +90110,7 @@ var ts;
90085
90110
  // ], C.prototype, "prop");
90086
90111
  //
90087
90112
  var prefix = getClassMemberPrefix(node, member);
90088
- var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ true);
90113
+ var memberName = getExpressionForPropertyName(member, /*generateNameForComputedPropertyName*/ !ts.hasSyntacticModifier(member, 2 /* Ambient */));
90089
90114
  var descriptor = languageVersion > 0 /* ES3 */
90090
90115
  ? member.kind === 166 /* PropertyDeclaration */
90091
90116
  // We emit `void 0` here to indicate to `__decorate` that it can invoke `Object.defineProperty` directly, but that it