@typescript-deploys/pr-build 4.8.0-pr-49481-2 → 4.8.0-pr-49554-2

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.8";
72
- ts.version = ts.versionMajorMinor + ".0-insiders.20220610";
72
+ ts.version = ts.versionMajorMinor + ".0-insiders.20220615";
73
73
  var NativeCollections;
74
74
  (function (NativeCollections) {
75
75
  var globals = typeof globalThis !== "undefined" ? globalThis :
@@ -2239,7 +2239,7 @@ var ts;
2239
2239
  return members.length > 0 && members[0][0] === 0 ? members[0][1] : "0";
2240
2240
  }
2241
2241
  if (isFlags) {
2242
- var result = "";
2242
+ var result = [];
2243
2243
  var remainingFlags = value;
2244
2244
  for (var _i = 0, members_1 = members; _i < members_1.length; _i++) {
2245
2245
  var _a = members_1[_i], enumValue = _a[0], enumName = _a[1];
@@ -2247,12 +2247,12 @@ var ts;
2247
2247
  break;
2248
2248
  }
2249
2249
  if (enumValue !== 0 && enumValue & value) {
2250
- result = "" + result + (result ? "|" : "") + enumName;
2250
+ result.push(enumName);
2251
2251
  remainingFlags &= ~enumValue;
2252
2252
  }
2253
2253
  }
2254
2254
  if (remainingFlags === 0) {
2255
- return result;
2255
+ return result.join("|");
2256
2256
  }
2257
2257
  }
2258
2258
  else {
@@ -2266,7 +2266,12 @@ var ts;
2266
2266
  return value.toString();
2267
2267
  }
2268
2268
  Debug.formatEnum = formatEnum;
2269
+ var enumMemberCache = new ts.Map();
2269
2270
  function getEnumMembers(enumObject) {
2271
+ var existing = enumMemberCache.get(enumObject);
2272
+ if (existing) {
2273
+ return existing;
2274
+ }
2270
2275
  var result = [];
2271
2276
  for (var name in enumObject) {
2272
2277
  var value = enumObject[name];
@@ -2274,7 +2279,9 @@ var ts;
2274
2279
  result.push([value, name]);
2275
2280
  }
2276
2281
  }
2277
- return ts.stableSort(result, function (x, y) { return ts.compareValues(x[0], y[0]); });
2282
+ var sorted = ts.stableSort(result, function (x, y) { return ts.compareValues(x[0], y[0]); });
2283
+ enumMemberCache.set(enumObject, sorted);
2284
+ return sorted;
2278
2285
  }
2279
2286
  function formatSyntaxKind(kind) {
2280
2287
  return formatEnum(kind, ts.SyntaxKind, false);
@@ -5639,6 +5646,7 @@ var ts;
5639
5646
  The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2209, ts.DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_export_map_entry_0_in_file_1_Supply_the_roo_2209", "The project root is ambiguous, but is required to resolve export map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),
5640
5647
  The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_rootDir_compiler_option_to_disambiguate: diag(2210, ts.DiagnosticCategory.Error, "The_project_root_is_ambiguous_but_is_required_to_resolve_import_map_entry_0_in_file_1_Supply_the_roo_2210", "The project root is ambiguous, but is required to resolve import map entry '{0}' in file '{1}'. Supply the `rootDir` compiler option to disambiguate."),
5641
5648
  Add_extends_constraint: diag(2211, ts.DiagnosticCategory.Message, "Add_extends_constraint_2211", "Add `extends` constraint."),
5649
+ Add_extends_constraint_to_all_type_parameters: diag(2212, ts.DiagnosticCategory.Message, "Add_extends_constraint_to_all_type_parameters_2212", "Add `extends` constraint to all type parameters"),
5642
5650
  Duplicate_identifier_0: diag(2300, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."),
5643
5651
  Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, ts.DiagnosticCategory.Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
5644
5652
  Static_members_cannot_reference_class_type_parameters: diag(2302, ts.DiagnosticCategory.Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."),
@@ -6124,6 +6132,8 @@ var ts;
6124
6132
  This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, ts.DiagnosticCategory.Error, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
6125
6133
  An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, ts.DiagnosticCategory.Error, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),
6126
6134
  The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_feature_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(2841, ts.DiagnosticCategory.Error, "The_type_of_this_expression_cannot_be_named_without_a_resolution_mode_assertion_which_is_an_unstable_2841", "The type of this expression cannot be named without a 'resolution-mode' assertion, which is an unstable feature. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
6135
+ _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, ts.DiagnosticCategory.Error, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),
6136
+ We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, ts.DiagnosticCategory.Error, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."),
6127
6137
  Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
6128
6138
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
6129
6139
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -28770,9 +28780,10 @@ var ts;
28770
28780
  }
28771
28781
  nextToken();
28772
28782
  var typeArguments = parseDelimitedList(20, parseType);
28773
- if (!parseExpected(31)) {
28783
+ if (reScanGreaterToken() !== 31) {
28774
28784
  return undefined;
28775
28785
  }
28786
+ nextToken();
28776
28787
  return typeArguments && canFollowTypeArgumentsInExpression() ? typeArguments : undefined;
28777
28788
  }
28778
28789
  function canFollowTypeArgumentsInExpression() {
@@ -37014,7 +37025,7 @@ var ts;
37014
37025
  case 317:
37015
37026
  return (ts.isJSDocConstructSignature(node) ? "__new" : "__call");
37016
37027
  case 164:
37017
- ts.Debug.assert(node.parent.kind === 317, "Impossible parameter parent kind", function () { return "parent is: " + (ts.SyntaxKind ? ts.SyntaxKind[node.parent.kind] : node.parent.kind) + ", expected JSDocFunctionType"; });
37028
+ ts.Debug.assert(node.parent.kind === 317, "Impossible parameter parent kind", function () { return "parent is: " + ts.Debug.formatSyntaxKind(node.parent.kind) + ", expected JSDocFunctionType"; });
37018
37029
  var functionType = node.parent;
37019
37030
  var index = functionType.parameters.indexOf(node);
37020
37031
  return "arg" + index;
@@ -40336,6 +40347,7 @@ var ts;
40336
40347
  var potentialNewTargetCollisions = [];
40337
40348
  var potentialWeakMapSetCollisions = [];
40338
40349
  var potentialReflectCollisions = [];
40350
+ var potentialUnusedRenamedBindingElementsInTypes = [];
40339
40351
  var awaitedTypeStack = [];
40340
40352
  var diagnostics = ts.createDiagnosticCollection();
40341
40353
  var suggestionDiagnostics = ts.createDiagnosticCollection();
@@ -43211,6 +43223,9 @@ var ts;
43211
43223
  if (symbol && symbol.flags & 262144 && meaning & 788968) {
43212
43224
  return { accessibility: 0 };
43213
43225
  }
43226
+ if (!symbol && ts.isThisIdentifier(firstIdentifier) && isSymbolAccessible(getSymbolOfNode(ts.getThisContainer(firstIdentifier, false)), firstIdentifier, meaning, false).accessibility === 0) {
43227
+ return { accessibility: 0 };
43228
+ }
43214
43229
  return (symbol && hasVisibleDeclarations(symbol, true)) || {
43215
43230
  accessibility: 1,
43216
43231
  errorSymbolName: ts.getTextOfNode(firstIdentifier),
@@ -44309,14 +44324,19 @@ var ts;
44309
44324
  context.approximateLength += ts.symbolName(parameterSymbol).length + 3;
44310
44325
  return parameterNode;
44311
44326
  function cloneBindingName(node) {
44312
- return elideInitializerAndSetEmitFlags(node);
44313
- function elideInitializerAndSetEmitFlags(node) {
44327
+ return elideInitializerAndPropertyRenamingAndSetEmitFlags(node);
44328
+ function elideInitializerAndPropertyRenamingAndSetEmitFlags(node) {
44314
44329
  if (context.tracker.trackSymbol && ts.isComputedPropertyName(node) && isLateBindableName(node)) {
44315
44330
  trackComputedName(node.expression, context.enclosingDeclaration, context);
44316
44331
  }
44317
- var visited = ts.visitEachChild(node, elideInitializerAndSetEmitFlags, ts.nullTransformationContext, undefined, elideInitializerAndSetEmitFlags);
44332
+ var visited = ts.visitEachChild(node, elideInitializerAndPropertyRenamingAndSetEmitFlags, ts.nullTransformationContext, undefined, elideInitializerAndPropertyRenamingAndSetEmitFlags);
44318
44333
  if (ts.isBindingElement(visited)) {
44319
- visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name, undefined);
44334
+ if (visited.propertyName && ts.isIdentifier(visited.propertyName) && ts.isIdentifier(visited.name)) {
44335
+ visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, undefined, visited.propertyName, undefined);
44336
+ }
44337
+ else {
44338
+ visited = ts.factory.updateBindingElement(visited, visited.dotDotDotToken, visited.propertyName, visited.name, undefined);
44339
+ }
44320
44340
  }
44321
44341
  if (!ts.nodeIsSynthesized(visited)) {
44322
44342
  visited = ts.factory.cloneNode(visited);
@@ -54112,7 +54132,7 @@ var ts;
54112
54132
  return true;
54113
54133
  if (s & 65536 && (!strictNullChecks && !(t & 3145728) || t & 65536))
54114
54134
  return true;
54115
- if (s & 524288 && t & 67108864 && !(relation === strictSubtypeRelation && isEmptyAnonymousObjectType(source)))
54135
+ if (s & 524288 && t & 67108864 && !(relation === strictSubtypeRelation && isEmptyAnonymousObjectType(source) && !(ts.getObjectFlags(source) & 8192)))
54116
54136
  return true;
54117
54137
  if (relation === assignableRelation || relation === comparableRelation) {
54118
54138
  if (s & 1)
@@ -54597,8 +54617,12 @@ var ts;
54597
54617
  }
54598
54618
  reportRelationError(headMessage, source, target);
54599
54619
  if (source.flags & 262144 && ((_b = (_a = source.symbol) === null || _a === void 0 ? void 0 : _a.declarations) === null || _b === void 0 ? void 0 : _b[0]) && !getConstraintOfType(source)) {
54600
- var targetConstraintString = typeToString(target, source.symbol.declarations[0]);
54601
- associateRelatedInfo(ts.createDiagnosticForNode(source.symbol.declarations[0], ts.Diagnostics.This_type_parameter_might_need_an_extends_0_constraint, targetConstraintString));
54620
+ var syntheticParam = cloneTypeParameter(source);
54621
+ syntheticParam.constraint = instantiateType(target, makeUnaryTypeMapper(source, syntheticParam));
54622
+ if (hasNonCircularBaseConstraint(syntheticParam)) {
54623
+ var targetConstraintString = typeToString(target, source.symbol.declarations[0]);
54624
+ associateRelatedInfo(ts.createDiagnosticForNode(source.symbol.declarations[0], ts.Diagnostics.This_type_parameter_might_need_an_extends_0_constraint, targetConstraintString));
54625
+ }
54602
54626
  }
54603
54627
  }
54604
54628
  function traceUnionsOrIntersectionsTooLarge(source, target) {
@@ -54723,7 +54747,7 @@ var ts;
54723
54747
  return typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source), target, reportErrors && !(source.flags & 131068) && !(target.flags & 131068));
54724
54748
  }
54725
54749
  if (target.flags & 2097152) {
54726
- return typeRelatedToEachType(getRegularTypeOfObjectLiteral(source), target, reportErrors, 2);
54750
+ return typeRelatedToEachType(source, target, reportErrors, 2);
54727
54751
  }
54728
54752
  if (relation === comparableRelation && target.flags & 131068) {
54729
54753
  var constraints = ts.sameMap(source.types, getBaseConstraintOrType);
@@ -56747,12 +56771,13 @@ var ts;
56747
56771
  && ((target.flags & (8 | 4 | 16)) !== 0);
56748
56772
  }
56749
56773
  function isObjectTypeWithInferableIndex(type) {
56774
+ var objectFlags = ts.getObjectFlags(type);
56750
56775
  return type.flags & 2097152
56751
56776
  ? ts.every(type.types, isObjectTypeWithInferableIndex)
56752
56777
  : !!(type.symbol
56753
56778
  && (type.symbol.flags & (4096 | 2048 | 384 | 512)) !== 0
56754
56779
  && !(type.symbol.flags & 32)
56755
- && !typeHasCallOrConstructSignatures(type)) || !!(ts.getObjectFlags(type) & 1024 && isObjectTypeWithInferableIndex(type.source));
56780
+ && !typeHasCallOrConstructSignatures(type)) || !!(objectFlags & 4194304) || !!(objectFlags & 1024 && isObjectTypeWithInferableIndex(type.source));
56756
56781
  }
56757
56782
  function createSymbolWithType(source, type) {
56758
56783
  var symbol = createSymbol(source.flags, source.escapedName, ts.getCheckFlags(source) & 8);
@@ -69332,6 +69357,21 @@ var ts;
69332
69357
  }
69333
69358
  });
69334
69359
  }
69360
+ function checkPotentialUncheckedRenamedBindingElementsInTypes() {
69361
+ var _a;
69362
+ for (var _i = 0, potentialUnusedRenamedBindingElementsInTypes_1 = potentialUnusedRenamedBindingElementsInTypes; _i < potentialUnusedRenamedBindingElementsInTypes_1.length; _i++) {
69363
+ var node = potentialUnusedRenamedBindingElementsInTypes_1[_i];
69364
+ if (!((_a = getSymbolOfNode(node)) === null || _a === void 0 ? void 0 : _a.isReferenced)) {
69365
+ var wrappingDeclaration = ts.walkUpBindingElementsAndPatterns(node);
69366
+ ts.Debug.assert(ts.isParameterDeclaration(wrappingDeclaration), "Only parameter declaration should be checked here");
69367
+ var diagnostic = ts.createDiagnosticForNode(node.name, ts.Diagnostics._0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation, ts.declarationNameToString(node.name), ts.declarationNameToString(node.propertyName));
69368
+ if (!wrappingDeclaration.type) {
69369
+ ts.addRelatedInfo(diagnostic, ts.createFileDiagnostic(ts.getSourceFileOfNode(wrappingDeclaration), wrappingDeclaration.end, 1, ts.Diagnostics.We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here, ts.declarationNameToString(node.propertyName)));
69370
+ }
69371
+ diagnostics.add(diagnostic);
69372
+ }
69373
+ }
69374
+ }
69335
69375
  function bindingNameText(name) {
69336
69376
  switch (name.kind) {
69337
69377
  case 79:
@@ -69574,6 +69614,13 @@ var ts;
69574
69614
  }
69575
69615
  }
69576
69616
  if (ts.isBindingElement(node)) {
69617
+ if (node.propertyName &&
69618
+ ts.isIdentifier(node.name) &&
69619
+ ts.isParameterDeclaration(node) &&
69620
+ ts.nodeIsMissing(ts.getContainingFunction(node).body)) {
69621
+ potentialUnusedRenamedBindingElementsInTypes.push(node);
69622
+ return;
69623
+ }
69577
69624
  if (ts.isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5) {
69578
69625
  checkExternalEmitHelpers(node, 4);
69579
69626
  }
@@ -72564,6 +72611,7 @@ var ts;
72564
72611
  ts.clear(potentialNewTargetCollisions);
72565
72612
  ts.clear(potentialWeakMapSetCollisions);
72566
72613
  ts.clear(potentialReflectCollisions);
72614
+ ts.clear(potentialUnusedRenamedBindingElementsInTypes);
72567
72615
  ts.forEach(node.statements, checkSourceElement);
72568
72616
  checkSourceElement(node.endOfFileToken);
72569
72617
  checkDeferredNodes(node);
@@ -72578,6 +72626,9 @@ var ts;
72578
72626
  }
72579
72627
  });
72580
72628
  }
72629
+ if (!node.isDeclarationFile) {
72630
+ checkPotentialUncheckedRenamedBindingElementsInTypes();
72631
+ }
72581
72632
  });
72582
72633
  if (compilerOptions.importsNotUsedAsValues === 2 &&
72583
72634
  !node.isDeclarationFile &&
@@ -89008,7 +89059,7 @@ var ts;
89008
89059
  return getTypeAliasDeclarationVisibilityError;
89009
89060
  }
89010
89061
  else {
89011
- return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: " + ts.SyntaxKind[node.kind]);
89062
+ return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: " + ts.Debug.formatSyntaxKind(node.kind));
89012
89063
  }
89013
89064
  function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
89014
89065
  if (node.kind === 254 || node.kind === 203) {
@@ -89205,7 +89256,7 @@ var ts;
89205
89256
  ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
89206
89257
  ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
89207
89258
  default:
89208
- return ts.Debug.fail("Unknown parent for parameter: " + ts.SyntaxKind[node.parent.kind]);
89259
+ return ts.Debug.fail("Unknown parent for parameter: " + ts.Debug.formatSyntaxKind(node.parent.kind));
89209
89260
  }
89210
89261
  }
89211
89262
  function getTypeParameterConstraintVisibilityError() {
@@ -89657,7 +89708,7 @@ var ts;
89657
89708
  });
89658
89709
  return ret;
89659
89710
  }
89660
- function filterBindingPatternInitializers(name) {
89711
+ function filterBindingPatternInitializersAndRenamings(name) {
89661
89712
  if (name.kind === 79) {
89662
89713
  return name;
89663
89714
  }
@@ -89673,7 +89724,10 @@ var ts;
89673
89724
  if (elem.kind === 227) {
89674
89725
  return elem;
89675
89726
  }
89676
- return factory.updateBindingElement(elem, elem.dotDotDotToken, elem.propertyName, filterBindingPatternInitializers(elem.name), shouldPrintWithInitializer(elem) ? elem.initializer : undefined);
89727
+ if (elem.propertyName && ts.isIdentifier(elem.propertyName) && ts.isIdentifier(elem.name) && !elem.symbol.isReferenced) {
89728
+ return factory.updateBindingElement(elem, elem.dotDotDotToken, undefined, elem.propertyName, shouldPrintWithInitializer(elem) ? elem.initializer : undefined);
89729
+ }
89730
+ return factory.updateBindingElement(elem, elem.dotDotDotToken, elem.propertyName, filterBindingPatternInitializersAndRenamings(elem.name), shouldPrintWithInitializer(elem) ? elem.initializer : undefined);
89677
89731
  }
89678
89732
  }
89679
89733
  function ensureParameter(p, modifierMask, type) {
@@ -89682,7 +89736,7 @@ var ts;
89682
89736
  oldDiag = getSymbolAccessibilityDiagnostic;
89683
89737
  getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(p);
89684
89738
  }
89685
- var newParam = factory.updateParameterDeclaration(p, maskModifiers(p, modifierMask), p.dotDotDotToken, filterBindingPatternInitializers(p.name), resolver.isOptionalParameter(p) ? (p.questionToken || factory.createToken(57)) : undefined, ensureType(p, type || p.type, true), ensureNoInitializer(p));
89739
+ var newParam = factory.updateParameterDeclaration(p, maskModifiers(p, modifierMask), p.dotDotDotToken, filterBindingPatternInitializersAndRenamings(p.name), resolver.isOptionalParameter(p) ? (p.questionToken || factory.createToken(57)) : undefined, ensureType(p, type || p.type, true), ensureNoInitializer(p));
89686
89740
  if (!suppressNewDiagnosticContexts) {
89687
89741
  getSymbolAccessibilityDiagnostic = oldDiag;
89688
89742
  }
@@ -89909,7 +89963,7 @@ var ts;
89909
89963
  while (ts.length(lateMarkedStatements)) {
89910
89964
  var i = lateMarkedStatements.shift();
89911
89965
  if (!ts.isLateVisibilityPaintedStatement(i)) {
89912
- return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: " + (ts.SyntaxKind ? ts.SyntaxKind[i.kind] : i.kind));
89966
+ return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: " + ts.Debug.formatSyntaxKind(i.kind));
89913
89967
  }
89914
89968
  var priorNeedsDeclare = needsDeclare;
89915
89969
  needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
@@ -90074,7 +90128,7 @@ var ts;
90074
90128
  return cleanup(input);
90075
90129
  return cleanup(factory.updateImportTypeNode(input, factory.updateLiteralTypeNode(input.argument, rewriteModuleSpecifier(input, input.argument.literal)), input.assertions, input.qualifier, ts.visitNodes(input.typeArguments, visitDeclarationSubtree, ts.isTypeNode), input.isTypeOf));
90076
90130
  }
90077
- default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: " + ts.SyntaxKind[input.kind]);
90131
+ default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: " + ts.Debug.formatSyntaxKind(input.kind));
90078
90132
  }
90079
90133
  }
90080
90134
  if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
@@ -90361,7 +90415,7 @@ var ts;
90361
90415
  }))));
90362
90416
  }
90363
90417
  }
90364
- return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: " + ts.SyntaxKind[input.kind]);
90418
+ return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: " + ts.Debug.formatSyntaxKind(input.kind));
90365
90419
  function cleanup(node) {
90366
90420
  if (isEnclosingDeclaration(input)) {
90367
90421
  enclosingDeclaration = previousEnclosingDeclaration;
@@ -97005,6 +97059,7 @@ var ts;
97005
97059
  ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations.code,
97006
97060
  ts.Diagnostics.Class_constructor_may_not_be_a_generator.code,
97007
97061
  ts.Diagnostics.Class_constructor_may_not_be_an_accessor.code,
97062
+ ts.Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules.code,
97008
97063
  ]);
97009
97064
  function shouldProgramCreateNewSourceFiles(program, newOptions) {
97010
97065
  if (!program)
@@ -101447,9 +101502,11 @@ var ts;
101447
101502
  }
101448
101503
  function watchAffectingLocationsOfResolution(resolution, addToResolutionsWithOnlyAffectingLocations) {
101449
101504
  ts.Debug.assert(!!resolution.refCount);
101505
+ var affectingLocations = resolution.affectingLocations;
101506
+ if (!affectingLocations.length)
101507
+ return;
101450
101508
  if (addToResolutionsWithOnlyAffectingLocations)
101451
101509
  resolutionsWithOnlyAffectingLocations.push(resolution);
101452
- var affectingLocations = resolution.affectingLocations;
101453
101510
  for (var _i = 0, affectingLocations_1 = affectingLocations; _i < affectingLocations_1.length; _i++) {
101454
101511
  var affectingLocation = affectingLocations_1[_i];
101455
101512
  createFileWatcherOfAffectingLocation(affectingLocation);