typescript 4.5.0-dev.20211017 → 4.5.0-dev.20211021

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsc.js CHANGED
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
69
69
  var ts;
70
70
  (function (ts) {
71
71
  ts.versionMajorMinor = "4.5";
72
- ts.version = ts.versionMajorMinor + ".0-dev.20211017";
72
+ ts.version = ts.versionMajorMinor + ".0-dev.20211021";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  function tryGetNativeMap() {
@@ -6563,6 +6563,7 @@ var ts;
6563
6563
  If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: diag(7058, ts.DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),
6564
6564
  This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),
6565
6565
  This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),
6566
+ A_mapped_type_may_not_declare_properties_or_methods: diag(7061, ts.DiagnosticCategory.Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."),
6566
6567
  You_cannot_rename_this_element: diag(8000, ts.DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."),
6567
6568
  You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, ts.DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."),
6568
6569
  import_can_only_be_used_in_TypeScript_files: diag(8002, ts.DiagnosticCategory.Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."),
@@ -18333,23 +18334,25 @@ var ts;
18333
18334
  ? update(createIndexedAccessTypeNode(objectType, indexType), node)
18334
18335
  : node;
18335
18336
  }
18336
- function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type) {
18337
+ function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) {
18337
18338
  var node = createBaseNode(194);
18338
18339
  node.readonlyToken = readonlyToken;
18339
18340
  node.typeParameter = typeParameter;
18340
18341
  node.nameType = nameType;
18341
18342
  node.questionToken = questionToken;
18342
18343
  node.type = type;
18344
+ node.members = members && createNodeArray(members);
18343
18345
  node.transformFlags = 1;
18344
18346
  return node;
18345
18347
  }
18346
- function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type) {
18348
+ function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type, members) {
18347
18349
  return node.readonlyToken !== readonlyToken
18348
18350
  || node.typeParameter !== typeParameter
18349
18351
  || node.nameType !== nameType
18350
18352
  || node.questionToken !== questionToken
18351
18353
  || node.type !== type
18352
- ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type), node)
18354
+ || node.members !== members
18355
+ ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node)
18353
18356
  : node;
18354
18357
  }
18355
18358
  function createLiteralTypeNode(literal) {
@@ -23983,7 +23986,8 @@ var ts;
23983
23986
  visitNode(cbNode, node.typeParameter) ||
23984
23987
  visitNode(cbNode, node.nameType) ||
23985
23988
  visitNode(cbNode, node.questionToken) ||
23986
- visitNode(cbNode, node.type);
23989
+ visitNode(cbNode, node.type) ||
23990
+ visitNodes(cbNode, cbNodes, node.members);
23987
23991
  case 195:
23988
23992
  return visitNode(cbNode, node.literal);
23989
23993
  case 196:
@@ -26328,8 +26332,9 @@ var ts;
26328
26332
  }
26329
26333
  var type = parseTypeAnnotation();
26330
26334
  parseSemicolon();
26335
+ var members = parseList(4, parseTypeMember);
26331
26336
  parseExpected(19);
26332
- return finishNode(factory.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type), pos);
26337
+ return finishNode(factory.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos);
26333
26338
  }
26334
26339
  function parseTupleElementType() {
26335
26340
  var pos = getNodePos();
@@ -30669,7 +30674,7 @@ var ts;
30669
30674
  })(ts || (ts = {}));
30670
30675
  var ts;
30671
30676
  (function (ts) {
30672
- ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean" };
30677
+ ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean", defaultValueDescription: "false" };
30673
30678
  var jsxOptionMap = new ts.Map(ts.getEntries({
30674
30679
  "preserve": 1,
30675
30680
  "react-native": 3,
@@ -30785,6 +30790,7 @@ var ts;
30785
30790
  type: "boolean",
30786
30791
  category: ts.Diagnostics.Watch_and_Build_Modes,
30787
30792
  description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
30793
+ defaultValueDescription: "false",
30788
30794
  },
30789
30795
  {
30790
30796
  name: "excludeDirectories",
@@ -30819,11 +30825,13 @@ var ts;
30819
30825
  showInSimplifiedHelpView: true,
30820
30826
  category: ts.Diagnostics.Command_line_Options,
30821
30827
  description: ts.Diagnostics.Print_this_message,
30828
+ defaultValueDescription: "false",
30822
30829
  },
30823
30830
  {
30824
30831
  name: "help",
30825
30832
  shortName: "?",
30826
- type: "boolean"
30833
+ type: "boolean",
30834
+ defaultValueDescription: "false",
30827
30835
  },
30828
30836
  {
30829
30837
  name: "watch",
@@ -30833,6 +30841,7 @@ var ts;
30833
30841
  isCommandLineOnly: true,
30834
30842
  category: ts.Diagnostics.Command_line_Options,
30835
30843
  description: ts.Diagnostics.Watch_input_files,
30844
+ defaultValueDescription: "false",
30836
30845
  },
30837
30846
  {
30838
30847
  name: "preserveWatchOutput",
@@ -30840,7 +30849,7 @@ var ts;
30840
30849
  showInSimplifiedHelpView: false,
30841
30850
  category: ts.Diagnostics.Output_Formatting,
30842
30851
  description: ts.Diagnostics.Disable_wiping_the_console_in_watch_mode,
30843
- defaultValueDescription: "n/a"
30852
+ defaultValueDescription: "false",
30844
30853
  },
30845
30854
  {
30846
30855
  name: "listFiles",
@@ -30853,7 +30862,8 @@ var ts;
30853
30862
  name: "explainFiles",
30854
30863
  type: "boolean",
30855
30864
  category: ts.Diagnostics.Compiler_Diagnostics,
30856
- description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included
30865
+ description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,
30866
+ defaultValueDescription: "false",
30857
30867
  },
30858
30868
  {
30859
30869
  name: "listEmittedFiles",
@@ -30924,7 +30934,8 @@ var ts;
30924
30934
  affectsSemanticDiagnostics: true,
30925
30935
  affectsEmit: true,
30926
30936
  category: ts.Diagnostics.Watch_and_Build_Modes,
30927
- 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
30937
+ 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,
30938
+ defaultValueDescription: "false",
30928
30939
  },
30929
30940
  {
30930
30941
  name: "locale",
@@ -30967,6 +30978,7 @@ var ts;
30967
30978
  showInSimplifiedHelpView: true,
30968
30979
  category: ts.Diagnostics.Command_line_Options,
30969
30980
  description: ts.Diagnostics.Show_all_compiler_options,
30981
+ defaultValueDescription: "false",
30970
30982
  },
30971
30983
  {
30972
30984
  name: "version",
@@ -30975,6 +30987,7 @@ var ts;
30975
30987
  showInSimplifiedHelpView: true,
30976
30988
  category: ts.Diagnostics.Command_line_Options,
30977
30989
  description: ts.Diagnostics.Print_the_compiler_s_version,
30990
+ defaultValueDescription: "false",
30978
30991
  },
30979
30992
  {
30980
30993
  name: "init",
@@ -30982,6 +30995,7 @@ var ts;
30982
30995
  showInSimplifiedHelpView: true,
30983
30996
  category: ts.Diagnostics.Command_line_Options,
30984
30997
  description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
30998
+ defaultValueDescription: "false",
30985
30999
  },
30986
31000
  {
30987
31001
  name: "project",
@@ -30999,7 +31013,8 @@ var ts;
30999
31013
  shortName: "b",
31000
31014
  showInSimplifiedHelpView: true,
31001
31015
  category: ts.Diagnostics.Command_line_Options,
31002
- description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date
31016
+ description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,
31017
+ defaultValueDescription: "false",
31003
31018
  },
31004
31019
  {
31005
31020
  name: "showConfig",
@@ -31007,7 +31022,8 @@ var ts;
31007
31022
  showInSimplifiedHelpView: true,
31008
31023
  category: ts.Diagnostics.Command_line_Options,
31009
31024
  isCommandLineOnly: true,
31010
- description: ts.Diagnostics.Print_the_final_configuration_instead_of_building
31025
+ description: ts.Diagnostics.Print_the_final_configuration_instead_of_building,
31026
+ defaultValueDescription: "false",
31011
31027
  },
31012
31028
  {
31013
31029
  name: "listFilesOnly",
@@ -31016,7 +31032,8 @@ var ts;
31016
31032
  affectsSemanticDiagnostics: true,
31017
31033
  affectsEmit: true,
31018
31034
  isCommandLineOnly: true,
31019
- description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing
31035
+ description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
31036
+ defaultValueDescription: "false",
31020
31037
  },
31021
31038
  ts.targetOptionDeclaration,
31022
31039
  {
@@ -31135,7 +31152,6 @@ var ts;
31135
31152
  category: ts.Diagnostics.Emit,
31136
31153
  description: ts.Diagnostics.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output,
31137
31154
  transpileOptionValue: undefined,
31138
- defaultValueDescription: "n/a"
31139
31155
  },
31140
31156
  {
31141
31157
  name: "outDir",
@@ -31146,7 +31162,6 @@ var ts;
31146
31162
  showInSimplifiedHelpView: true,
31147
31163
  category: ts.Diagnostics.Emit,
31148
31164
  description: ts.Diagnostics.Specify_an_output_folder_for_all_emitted_files,
31149
- defaultValueDescription: "n/a"
31150
31165
  },
31151
31166
  {
31152
31167
  name: "rootDir",
@@ -31300,6 +31315,7 @@ var ts;
31300
31315
  strictFlag: true,
31301
31316
  category: ts.Diagnostics.Type_Checking,
31302
31317
  description: ts.Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
31318
+ defaultValueDescription: "false",
31303
31319
  },
31304
31320
  {
31305
31321
  name: "alwaysStrict",
@@ -31331,7 +31347,8 @@ var ts;
31331
31347
  type: "boolean",
31332
31348
  affectsSemanticDiagnostics: true,
31333
31349
  category: ts.Diagnostics.Type_Checking,
31334
- description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined
31350
+ description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
31351
+ defaultValueDescription: "false",
31335
31352
  },
31336
31353
  {
31337
31354
  name: "noImplicitReturns",
@@ -31347,21 +31364,24 @@ var ts;
31347
31364
  affectsBindDiagnostics: true,
31348
31365
  affectsSemanticDiagnostics: true,
31349
31366
  category: ts.Diagnostics.Type_Checking,
31350
- description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements
31367
+ description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
31368
+ defaultValueDescription: "false",
31351
31369
  },
31352
31370
  {
31353
31371
  name: "noUncheckedIndexedAccess",
31354
31372
  type: "boolean",
31355
31373
  affectsSemanticDiagnostics: true,
31356
31374
  category: ts.Diagnostics.Type_Checking,
31357
- description: ts.Diagnostics.Include_undefined_in_index_signature_results
31375
+ description: ts.Diagnostics.Include_undefined_in_index_signature_results,
31376
+ defaultValueDescription: "false",
31358
31377
  },
31359
31378
  {
31360
31379
  name: "noImplicitOverride",
31361
31380
  type: "boolean",
31362
31381
  affectsSemanticDiagnostics: true,
31363
31382
  category: ts.Diagnostics.Type_Checking,
31364
- description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier
31383
+ description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
31384
+ defaultValueDescription: "false",
31365
31385
  },
31366
31386
  {
31367
31387
  name: "noPropertyAccessFromIndexSignature",
@@ -31465,7 +31485,7 @@ var ts;
31465
31485
  type: "boolean",
31466
31486
  category: ts.Diagnostics.Interop_Constraints,
31467
31487
  description: ts.Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,
31468
- defaultValueDescription: "n/a"
31488
+ defaultValueDescription: "false",
31469
31489
  },
31470
31490
  {
31471
31491
  name: "allowUmdGlobalAccess",
@@ -31512,7 +31532,8 @@ var ts;
31512
31532
  type: "boolean",
31513
31533
  affectsSemanticDiagnostics: true,
31514
31534
  category: ts.Diagnostics.Language_and_Environment,
31515
- description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators
31535
+ description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
31536
+ defaultValueDescription: "false",
31516
31537
  },
31517
31538
  {
31518
31539
  name: "emitDecoratorMetadata",
@@ -31520,7 +31541,8 @@ var ts;
31520
31541
  affectsSemanticDiagnostics: true,
31521
31542
  affectsEmit: true,
31522
31543
  category: ts.Diagnostics.Language_and_Environment,
31523
- description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files
31544
+ description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
31545
+ defaultValueDescription: "false",
31524
31546
  },
31525
31547
  {
31526
31548
  name: "jsxFactory",
@@ -31561,7 +31583,6 @@ var ts;
31561
31583
  category: ts.Diagnostics.Backwards_Compatibility,
31562
31584
  paramType: ts.Diagnostics.FILE,
31563
31585
  transpileOptionValue: undefined,
31564
- defaultValueDescription: "n/a",
31565
31586
  description: ts.Diagnostics.Deprecated_setting_Use_outFile_instead,
31566
31587
  },
31567
31588
  {
@@ -31638,6 +31659,7 @@ var ts;
31638
31659
  affectsEmit: true,
31639
31660
  category: ts.Diagnostics.Emit,
31640
31661
  description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
31662
+ defaultValueDescription: "false",
31641
31663
  },
31642
31664
  {
31643
31665
  name: "disableSizeLimit",
@@ -31652,21 +31674,24 @@ var ts;
31652
31674
  type: "boolean",
31653
31675
  isTSConfigOnly: true,
31654
31676
  category: ts.Diagnostics.Projects,
31655
- description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects
31677
+ description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,
31678
+ defaultValueDescription: "false",
31656
31679
  },
31657
31680
  {
31658
31681
  name: "disableSolutionSearching",
31659
31682
  type: "boolean",
31660
31683
  isTSConfigOnly: true,
31661
31684
  category: ts.Diagnostics.Projects,
31662
- description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing
31685
+ description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,
31686
+ defaultValueDescription: "false",
31663
31687
  },
31664
31688
  {
31665
31689
  name: "disableReferencedProjectLoad",
31666
31690
  type: "boolean",
31667
31691
  isTSConfigOnly: true,
31668
31692
  category: ts.Diagnostics.Projects,
31669
- description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript
31693
+ description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,
31694
+ defaultValueDescription: "false",
31670
31695
  },
31671
31696
  {
31672
31697
  name: "noImplicitUseStrict",
@@ -31699,7 +31724,7 @@ var ts;
31699
31724
  affectsEmit: true,
31700
31725
  category: ts.Diagnostics.Emit,
31701
31726
  description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
31702
- defaultValueDescription: "n/a"
31727
+ defaultValueDescription: "false",
31703
31728
  },
31704
31729
  {
31705
31730
  name: "declarationDir",
@@ -31710,7 +31735,6 @@ var ts;
31710
31735
  category: ts.Diagnostics.Emit,
31711
31736
  transpileOptionValue: undefined,
31712
31737
  description: ts.Diagnostics.Specify_the_output_directory_for_generated_declaration_files,
31713
- defaultValueDescription: "n/a"
31714
31738
  },
31715
31739
  {
31716
31740
  name: "skipLibCheck",
@@ -31792,6 +31816,7 @@ var ts;
31792
31816
  affectsEmit: true,
31793
31817
  category: ts.Diagnostics.Emit,
31794
31818
  description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
31819
+ defaultValueDescription: "false",
31795
31820
  },
31796
31821
  {
31797
31822
  name: "keyofStringsOnly",
@@ -31829,27 +31854,31 @@ var ts;
31829
31854
  shortName: "v",
31830
31855
  category: ts.Diagnostics.Command_line_Options,
31831
31856
  description: ts.Diagnostics.Enable_verbose_logging,
31832
- type: "boolean"
31857
+ type: "boolean",
31858
+ defaultValueDescription: "false",
31833
31859
  },
31834
31860
  {
31835
31861
  name: "dry",
31836
31862
  shortName: "d",
31837
31863
  category: ts.Diagnostics.Command_line_Options,
31838
31864
  description: ts.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,
31839
- type: "boolean"
31865
+ type: "boolean",
31866
+ defaultValueDescription: "false",
31840
31867
  },
31841
31868
  {
31842
31869
  name: "force",
31843
31870
  shortName: "f",
31844
31871
  category: ts.Diagnostics.Command_line_Options,
31845
31872
  description: ts.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,
31846
- type: "boolean"
31873
+ type: "boolean",
31874
+ defaultValueDescription: "false",
31847
31875
  },
31848
31876
  {
31849
31877
  name: "clean",
31850
31878
  category: ts.Diagnostics.Command_line_Options,
31851
31879
  description: ts.Diagnostics.Delete_the_outputs_of_all_projects,
31852
- type: "boolean"
31880
+ type: "boolean",
31881
+ defaultValueDescription: "false",
31853
31882
  }
31854
31883
  ];
31855
31884
  ts.buildOpts = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), ts.optionsForBuild, true);
@@ -31857,10 +31886,12 @@ var ts;
31857
31886
  {
31858
31887
  name: "enableAutoDiscovery",
31859
31888
  type: "boolean",
31889
+ defaultValueDescription: "false",
31860
31890
  },
31861
31891
  {
31862
31892
  name: "enable",
31863
31893
  type: "boolean",
31894
+ defaultValueDescription: "false",
31864
31895
  },
31865
31896
  {
31866
31897
  name: "include",
@@ -31881,6 +31912,7 @@ var ts;
31881
31912
  {
31882
31913
  name: "disableFilenameBasedTypeAcquisition",
31883
31914
  type: "boolean",
31915
+ defaultValueDescription: "false",
31884
31916
  },
31885
31917
  ];
31886
31918
  function createOptionNameMap(optionDeclarations) {
@@ -41929,7 +41961,7 @@ var ts;
41929
41961
  var typeParameterNode = typeParameterToDeclarationWithConstraint(getTypeParameterFromMappedType(type), context, appropriateConstraintTypeNode);
41930
41962
  var nameTypeNode = type.declaration.nameType ? typeToTypeNodeHelper(getNameTypeFromMappedType(type), context) : undefined;
41931
41963
  var templateTypeNode = typeToTypeNodeHelper(removeMissingType(getTemplateTypeFromMappedType(type), !!(getMappedTypeModifiers(type) & 4)), context);
41932
- var mappedTypeNode = ts.factory.createMappedTypeNode(readonlyToken, typeParameterNode, nameTypeNode, questionToken, templateTypeNode);
41964
+ var mappedTypeNode = ts.factory.createMappedTypeNode(readonlyToken, typeParameterNode, nameTypeNode, questionToken, templateTypeNode, undefined);
41933
41965
  context.approximateLength += 10;
41934
41966
  return ts.setEmitFlags(mappedTypeNode, 1);
41935
41967
  }
@@ -55888,15 +55920,14 @@ var ts;
55888
55920
  var inferredType = void 0;
55889
55921
  var signature = context.signature;
55890
55922
  if (signature) {
55891
- var inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : undefined;
55923
+ var inferredCovariantType_1 = inference.candidates ? getCovariantInference(inference, signature) : undefined;
55892
55924
  if (inference.contraCandidates) {
55893
- var inferredContravariantType = getContravariantInference(inference);
55894
- inferredType = inferredCovariantType && !(inferredCovariantType.flags & 131072) &&
55895
- isTypeSubtypeOf(inferredCovariantType, inferredContravariantType) ?
55896
- inferredCovariantType : inferredContravariantType;
55925
+ inferredType = inferredCovariantType_1 && !(inferredCovariantType_1.flags & 131072) &&
55926
+ ts.some(inference.contraCandidates, function (t) { return isTypeSubtypeOf(inferredCovariantType_1, t); }) ?
55927
+ inferredCovariantType_1 : getContravariantInference(inference);
55897
55928
  }
55898
- else if (inferredCovariantType) {
55899
- inferredType = inferredCovariantType;
55929
+ else if (inferredCovariantType_1) {
55930
+ inferredType = inferredCovariantType_1;
55900
55931
  }
55901
55932
  else if (context.flags & 1) {
55902
55933
  inferredType = silentNeverType;
@@ -59431,6 +59462,10 @@ var ts;
59431
59462
  function checkComputedPropertyName(node) {
59432
59463
  var links = getNodeLinks(node.expression);
59433
59464
  if (!links.resolvedType) {
59465
+ if ((ts.isTypeLiteralNode(node.parent.parent) || ts.isClassLike(node.parent.parent) || ts.isInterfaceDeclaration(node.parent.parent))
59466
+ && ts.isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 101) {
59467
+ return links.resolvedType = errorType;
59468
+ }
59434
59469
  links.resolvedType = checkExpression(node.expression);
59435
59470
  if (ts.isPropertyDeclaration(node.parent) && !ts.hasStaticModifier(node.parent) && ts.isClassExpression(node.parent.parent)) {
59436
59471
  var container = ts.getEnclosingBlockScopeContainer(node.parent.parent);
@@ -65652,6 +65687,7 @@ var ts;
65652
65687
  checkIndexedAccessIndexType(getTypeFromIndexedAccessTypeNode(node), node);
65653
65688
  }
65654
65689
  function checkMappedType(node) {
65690
+ checkGrammarMappedType(node);
65655
65691
  checkSourceElement(node.typeParameter);
65656
65692
  checkSourceElement(node.nameType);
65657
65693
  checkSourceElement(node.type);
@@ -65668,6 +65704,12 @@ var ts;
65668
65704
  checkTypeAssignableTo(constraintType, keyofConstraintType, ts.getEffectiveConstraintOfTypeParameter(node.typeParameter));
65669
65705
  }
65670
65706
  }
65707
+ function checkGrammarMappedType(node) {
65708
+ var _a;
65709
+ if ((_a = node.members) === null || _a === void 0 ? void 0 : _a.length) {
65710
+ return grammarErrorOnNode(node.members[0], ts.Diagnostics.A_mapped_type_may_not_declare_properties_or_methods);
65711
+ }
65712
+ }
65671
65713
  function checkThisType(node) {
65672
65714
  getTypeFromThisTypeNode(node);
65673
65715
  }
@@ -72484,6 +72526,9 @@ var ts;
72484
72526
  }
72485
72527
  }
72486
72528
  function checkGrammarProperty(node) {
72529
+ if (ts.isComputedPropertyName(node.name) && ts.isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 101) {
72530
+ return grammarErrorOnNode(node.parent.members[0], ts.Diagnostics.A_mapped_type_may_not_declare_properties_or_methods);
72531
+ }
72487
72532
  if (ts.isClassLike(node.parent)) {
72488
72533
  if (ts.isStringLiteral(node.name) && node.name.text === "constructor") {
72489
72534
  return grammarErrorOnNode(node.name, ts.Diagnostics.Classes_may_not_have_a_field_named_constructor);
@@ -72503,7 +72548,7 @@ var ts;
72503
72548
  return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer);
72504
72549
  }
72505
72550
  }
72506
- else if (node.parent.kind === 181) {
72551
+ else if (ts.isTypeLiteralNode(node.parent)) {
72507
72552
  if (checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) {
72508
72553
  return true;
72509
72554
  }
@@ -73094,7 +73139,7 @@ var ts;
73094
73139
  return factory.updateIndexedAccessTypeNode(node, nodeVisitor(node.objectType, visitor, ts.isTypeNode), nodeVisitor(node.indexType, visitor, ts.isTypeNode));
73095
73140
  case 194:
73096
73141
  ts.Debug.type(node);
73097
- return factory.updateMappedTypeNode(node, nodeVisitor(node.readonlyToken, tokenVisitor, ts.isReadonlyKeywordOrPlusOrMinusToken), nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.nameType, visitor, ts.isTypeNode), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionOrPlusOrMinusToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
73142
+ return factory.updateMappedTypeNode(node, nodeVisitor(node.readonlyToken, tokenVisitor, ts.isReadonlyKeywordOrPlusOrMinusToken), nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.nameType, visitor, ts.isTypeNode), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionOrPlusOrMinusToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodesVisitor(node.members, visitor, ts.isTypeElement));
73098
73143
  case 195:
73099
73144
  ts.Debug.type(node);
73100
73145
  return factory.updateLiteralTypeNode(node, nodeVisitor(node.literal, visitor, ts.isExpression));