@typescript-deploys/pr-build 4.5.0-pr-45836-7 → 4.5.0-pr-45903-8

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-insiders.20210913";
92
+ ts.version = ts.versionMajorMinor + ".0-insiders.20210916";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -8632,6 +8632,7 @@ var ts;
8632
8632
  Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: diag(2817, ts.DiagnosticCategory.Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."),
8633
8633
  Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),
8634
8634
  Namespace_name_cannot_be_0: diag(2819, ts.DiagnosticCategory.Error, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."),
8635
+ Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, ts.DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
8635
8636
  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}'."),
8636
8637
  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}'."),
8637
8638
  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}'."),
@@ -8733,6 +8734,11 @@ var ts;
8733
8734
  This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0: diag(4116, ts.DiagnosticCategory.Error, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),
8734
8735
  This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4117, ts.DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
8735
8736
  The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized: diag(4118, ts.DiagnosticCategory.Error, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."),
8737
+ This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4119, ts.DiagnosticCategory.Error, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),
8738
+ This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4120, ts.DiagnosticCategory.Error, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),
8739
+ This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class: diag(4121, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),
8740
+ This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
8741
+ This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
8736
8742
  The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
8737
8743
  Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
8738
8744
  File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
@@ -20667,6 +20673,15 @@ var ts;
20667
20673
  return name === "Infinity" || name === "-Infinity" || name === "NaN";
20668
20674
  }
20669
20675
  ts.isInfinityOrNaNString = isInfinityOrNaNString;
20676
+ function isCatchClauseVariableDeclaration(node) {
20677
+ return node.kind === 252 /* VariableDeclaration */ && node.parent.kind === 290 /* CatchClause */;
20678
+ }
20679
+ ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration;
20680
+ function isParameterOrCatchClauseVariable(symbol) {
20681
+ var declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
20682
+ return !!declaration && (ts.isParameter(declaration) || isCatchClauseVariableDeclaration(declaration));
20683
+ }
20684
+ ts.isParameterOrCatchClauseVariable = isParameterOrCatchClauseVariable;
20670
20685
  })(ts || (ts = {}));
20671
20686
  /* @internal */
20672
20687
  var ts;
@@ -45915,6 +45930,7 @@ var ts;
45915
45930
  var totalInstantiationCount = 0;
45916
45931
  var instantiationCount = 0;
45917
45932
  var instantiationDepth = 0;
45933
+ var inlineLevel = 0;
45918
45934
  var currentNode;
45919
45935
  var emptySymbols = ts.createSymbolTable();
45920
45936
  var arrayVariances = [1 /* Covariant */];
@@ -61926,6 +61942,13 @@ var ts;
61926
61942
  message = ts.Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties;
61927
61943
  }
61928
61944
  else {
61945
+ if (source.flags & 128 /* StringLiteral */ && target.flags & 1048576 /* Union */) {
61946
+ var suggestedType = getSuggestedTypeForNonexistentStringLiteralType(source, target);
61947
+ if (suggestedType) {
61948
+ reportError(ts.Diagnostics.Type_0_is_not_assignable_to_type_1_Did_you_mean_2, generalizedSourceType, targetType, typeToString(suggestedType));
61949
+ return;
61950
+ }
61951
+ }
61929
61952
  message = ts.Diagnostics.Type_0_is_not_assignable_to_type_1;
61930
61953
  }
61931
61954
  }
@@ -66479,25 +66502,6 @@ var ts;
66479
66502
  function getTypeWithFacts(type, include) {
66480
66503
  return filterType(type, function (t) { return (getTypeFacts(t) & include) !== 0; });
66481
66504
  }
66482
- function truthyTypeFilter(type, truthiness) {
66483
- if (!truthiness) {
66484
- if (type.flags & 64 /* BigInt */) {
66485
- return zeroBigIntType;
66486
- }
66487
- else if (type.flags & 16 /* Boolean */) {
66488
- return falseType;
66489
- }
66490
- else if (type.flags & 4 /* String */) {
66491
- return emptyStringType;
66492
- }
66493
- else if (type.flags & 8 /* Number */) {
66494
- return zeroType;
66495
- }
66496
- }
66497
- var facts = getTypeFacts(type);
66498
- var include = truthiness ? 4194304 /* Truthy */ : 8388608 /* Falsy */;
66499
- return ((facts & include) === 0) ? undefined : type;
66500
- }
66501
66505
  function getTypeWithDefault(type, defaultExpression) {
66502
66506
  return defaultExpression ?
66503
66507
  getUnionType([getNonUndefinedType(type), getTypeOfExpression(defaultExpression)]) :
@@ -66701,17 +66705,10 @@ var ts;
66701
66705
  function everyContainedType(type, f) {
66702
66706
  return type.flags & 3145728 /* UnionOrIntersection */ ? ts.every(type.types, f) : f(type);
66703
66707
  }
66704
- // TODO: make this actually performant
66705
- function compactMap(array, f) {
66706
- var result = ts.compact(ts.map(array, f));
66707
- return result.length === array.length && ts.every(array, function (item, i) { return item === result[i]; })
66708
- ? array
66709
- : result;
66710
- }
66711
- function filterAndNarrowType(type, narrow) {
66708
+ function filterType(type, f) {
66712
66709
  if (type.flags & 1048576 /* Union */) {
66713
66710
  var types = type.types;
66714
- var filtered = compactMap(types, narrow);
66711
+ var filtered = ts.filter(types, f);
66715
66712
  if (filtered === types) {
66716
66713
  return type;
66717
66714
  }
@@ -66724,7 +66721,7 @@ var ts;
66724
66721
  // Otherwise, if we have exactly one type left in the origin set, return that as the filtered type.
66725
66722
  // Otherwise, construct a new filtered origin type.
66726
66723
  var originTypes = origin.types;
66727
- var originFiltered = compactMap(originTypes, function (t) { return !!(t.flags & 1048576 /* Union */) ? t : narrow(t); });
66724
+ var originFiltered = ts.filter(originTypes, function (t) { return !!(t.flags & 1048576 /* Union */) || f(t); });
66728
66725
  if (originTypes.length - originFiltered.length === types.length - filtered.length) {
66729
66726
  if (originFiltered.length === 1) {
66730
66727
  return originFiltered[0];
@@ -66734,13 +66731,7 @@ var ts;
66734
66731
  }
66735
66732
  return getUnionTypeFromSortedList(filtered, type.objectFlags, /*aliasSymbol*/ undefined, /*aliasTypeArguments*/ undefined, newOrigin);
66736
66733
  }
66737
- if (type.flags & 131072 /* Never */) {
66738
- return type;
66739
- }
66740
- return narrow(type) || neverType;
66741
- }
66742
- function filterType(type, f) {
66743
- return filterAndNarrowType(type, function (t) { return f(t) ? t : undefined; });
66734
+ return type.flags & 131072 /* Never */ || f(type) ? type : neverType;
66744
66735
  }
66745
66736
  function removeType(type, targetType) {
66746
66737
  return filterType(type, function (t) { return t !== targetType; });
@@ -67118,9 +67109,10 @@ var ts;
67118
67109
  }
67119
67110
  function isConstantReference(node) {
67120
67111
  switch (node.kind) {
67121
- case 79 /* Identifier */:
67112
+ case 79 /* Identifier */: {
67122
67113
  var symbol = getResolvedSymbol(node);
67123
- return isConstVariable(symbol) || !!symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 162 /* Parameter */ && !isParameterAssigned(symbol);
67114
+ return isConstVariable(symbol) || ts.isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol);
67115
+ }
67124
67116
  case 204 /* PropertyAccessExpression */:
67125
67117
  case 205 /* ElementAccessExpression */:
67126
67118
  // The resolvedSymbol property is initialized by checkPropertyAccess or checkElementAccess before we get here.
@@ -67133,7 +67125,6 @@ var ts;
67133
67125
  var key;
67134
67126
  var isKeySet = false;
67135
67127
  var flowDepth = 0;
67136
- var inlineLevel = 0;
67137
67128
  if (flowAnalysisDisabled) {
67138
67129
  return errorType;
67139
67130
  }
@@ -67626,7 +67617,7 @@ var ts;
67626
67617
  function narrowTypeByTruthiness(type, expr, assumeTrue) {
67627
67618
  if (isMatchingReference(reference, expr)) {
67628
67619
  return type.flags & 2 /* Unknown */ && assumeTrue ? nonNullUnknownType :
67629
- filterAndNarrowType(type, function (t) { return truthyTypeFilter(t, assumeTrue); });
67620
+ getTypeWithFacts(type, assumeTrue ? 4194304 /* Truthy */ : 8388608 /* Falsy */);
67630
67621
  }
67631
67622
  if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) {
67632
67623
  type = getTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
@@ -68203,35 +68194,37 @@ var ts;
68203
68194
  node.kind === 165 /* PropertyDeclaration */;
68204
68195
  });
68205
68196
  }
68206
- // Check if a parameter is assigned anywhere within its declaring function.
68207
- function isParameterAssigned(symbol) {
68197
+ // Check if a parameter or catch variable is assigned anywhere
68198
+ function isSymbolAssigned(symbol) {
68208
68199
  if (!symbol.valueDeclaration) {
68209
68200
  return false;
68210
68201
  }
68211
- var func = ts.getRootDeclaration(symbol.valueDeclaration).parent;
68212
- var links = getNodeLinks(func);
68202
+ var parent = ts.getRootDeclaration(symbol.valueDeclaration).parent;
68203
+ var links = getNodeLinks(parent);
68213
68204
  if (!(links.flags & 8388608 /* AssignmentsMarked */)) {
68214
68205
  links.flags |= 8388608 /* AssignmentsMarked */;
68215
- if (!hasParentWithAssignmentsMarked(func)) {
68216
- markParameterAssignments(func);
68206
+ if (!hasParentWithAssignmentsMarked(parent)) {
68207
+ markNodeAssignments(parent);
68217
68208
  }
68218
68209
  }
68219
68210
  return symbol.isAssigned || false;
68220
68211
  }
68221
68212
  function hasParentWithAssignmentsMarked(node) {
68222
- return !!ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !!(getNodeLinks(node).flags & 8388608 /* AssignmentsMarked */); });
68213
+ return !!ts.findAncestor(node.parent, function (node) {
68214
+ return (ts.isFunctionLike(node) || ts.isCatchClause(node)) && !!(getNodeLinks(node).flags & 8388608 /* AssignmentsMarked */);
68215
+ });
68223
68216
  }
68224
- function markParameterAssignments(node) {
68217
+ function markNodeAssignments(node) {
68225
68218
  if (node.kind === 79 /* Identifier */) {
68226
68219
  if (ts.isAssignmentTarget(node)) {
68227
68220
  var symbol = getResolvedSymbol(node);
68228
- if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 162 /* Parameter */) {
68221
+ if (ts.isParameterOrCatchClauseVariable(symbol)) {
68229
68222
  symbol.isAssigned = true;
68230
68223
  }
68231
68224
  }
68232
68225
  }
68233
68226
  else {
68234
- ts.forEachChild(node, markParameterAssignments);
68227
+ ts.forEachChild(node, markNodeAssignments);
68235
68228
  }
68236
68229
  }
68237
68230
  function isConstVariable(symbol) {
@@ -68291,7 +68284,19 @@ var ts;
68291
68284
  return substituteConstraints ? mapType(type, function (t) { return t.flags & 465829888 /* Instantiable */ ? getBaseConstraintOrType(t) : t; }) : type;
68292
68285
  }
68293
68286
  function isExportOrExportExpression(location) {
68294
- return !!ts.findAncestor(location, function (e) { return e.parent && ts.isExportAssignment(e.parent) && e.parent.expression === e && ts.isEntityNameExpression(e); });
68287
+ return !!ts.findAncestor(location, function (n) {
68288
+ var parent = n.parent;
68289
+ if (parent === undefined) {
68290
+ return "quit";
68291
+ }
68292
+ if (ts.isExportAssignment(parent)) {
68293
+ return parent.expression === n && ts.isEntityNameExpression(n);
68294
+ }
68295
+ if (ts.isExportSpecifier(parent)) {
68296
+ return parent.name === n || parent.propertyName === n;
68297
+ }
68298
+ return false;
68299
+ });
68295
68300
  }
68296
68301
  function markAliasReferenced(symbol, location) {
68297
68302
  if (isNonLocalAlias(symbol, /*excludes*/ 111551 /* Value */) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol)) {
@@ -68440,7 +68445,7 @@ var ts;
68440
68445
  // analysis to include the immediately enclosing function.
68441
68446
  while (flowContainer !== declarationContainer && (flowContainer.kind === 211 /* FunctionExpression */ ||
68442
68447
  flowContainer.kind === 212 /* ArrowFunction */ || ts.isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) &&
68443
- (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter && !isParameterAssigned(localOrExportSymbol))) {
68448
+ (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter && !isSymbolAssigned(localOrExportSymbol))) {
68444
68449
  flowContainer = getControlFlowContainer(flowContainer);
68445
68450
  }
68446
68451
  // We only look for uninitialized variables in strict null checking mode, and only when we can analyze
@@ -71670,6 +71675,10 @@ var ts;
71670
71675
  }
71671
71676
  return suggestion;
71672
71677
  }
71678
+ function getSuggestedTypeForNonexistentStringLiteralType(source, target) {
71679
+ var candidates = target.types.filter(function (type) { return !!(type.flags & 128 /* StringLiteral */); });
71680
+ return ts.getSpellingSuggestion(source.value, candidates, function (type) { return type.value; });
71681
+ }
71673
71682
  /**
71674
71683
  * Given a name and a list of symbols whose names are *not* equal to the name, return a spelling suggestion if there is one that is close enough.
71675
71684
  * Names less than length 3 only check for case-insensitive equality, not levenshtein distance.
@@ -80498,6 +80507,7 @@ var ts;
80498
80507
  function checkClassMember(member, memberIsParameterProperty) {
80499
80508
  var hasOverride = ts.hasOverrideModifier(member);
80500
80509
  var hasStatic = ts.isStatic(member);
80510
+ var isJs = ts.isInJSFile(member);
80501
80511
  if (baseWithThis && (hasOverride || compilerOptions.noImplicitOverride)) {
80502
80512
  var declaredProp = member.name && getSymbolAtLocation(member.name) || getSymbolAtLocation(member);
80503
80513
  if (!declaredProp) {
@@ -80511,8 +80521,12 @@ var ts;
80511
80521
  if (prop && !baseProp && hasOverride) {
80512
80522
  var suggestion = getSuggestedSymbolForNonexistentClassMember(ts.symbolName(declaredProp), baseType);
80513
80523
  suggestion ?
80514
- error(member, ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, baseClassName, symbolToString(suggestion)) :
80515
- error(member, ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, baseClassName);
80524
+ error(member, isJs ?
80525
+ ts.Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 :
80526
+ ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, baseClassName, symbolToString(suggestion)) :
80527
+ error(member, isJs ?
80528
+ ts.Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0 :
80529
+ ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, baseClassName);
80516
80530
  }
80517
80531
  else if (prop && (baseProp === null || baseProp === void 0 ? void 0 : baseProp.declarations) && compilerOptions.noImplicitOverride && !nodeInAmbientContext) {
80518
80532
  var baseHasAbstract = ts.some(baseProp.declarations, ts.hasAbstractModifier);
@@ -80521,8 +80535,12 @@ var ts;
80521
80535
  }
80522
80536
  if (!baseHasAbstract) {
80523
80537
  var diag = memberIsParameterProperty ?
80524
- ts.Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0 :
80525
- ts.Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0;
80538
+ isJs ?
80539
+ ts.Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 :
80540
+ ts.Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0 :
80541
+ isJs ?
80542
+ ts.Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 :
80543
+ ts.Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0;
80526
80544
  error(member, diag, baseClassName);
80527
80545
  }
80528
80546
  else if (ts.hasAbstractModifier(member) && baseHasAbstract) {
@@ -80532,7 +80550,9 @@ var ts;
80532
80550
  }
80533
80551
  else if (hasOverride) {
80534
80552
  var className = typeToString(type);
80535
- error(member, ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class, className);
80553
+ error(member, isJs ?
80554
+ ts.Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class :
80555
+ ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class, className);
80536
80556
  }
80537
80557
  }
80538
80558
  }
@@ -112038,7 +112058,7 @@ var ts;
112038
112058
  }
112039
112059
  else {
112040
112060
  ts.forEach(options.lib, function (libFileName, index) {
112041
- processRootFile(ts.combinePaths(defaultLibraryPath, libFileName), /*isDefaultLib*/ true, /*ignoreNoDefaultLib*/ false, { kind: ts.FileIncludeKind.LibFile, index: index });
112061
+ processRootFile(pathForLibFile(libFileName), /*isDefaultLib*/ true, /*ignoreNoDefaultLib*/ false, { kind: ts.FileIncludeKind.LibFile, index: index });
112042
112062
  });
112043
112063
  }
112044
112064
  }
@@ -112700,7 +112720,7 @@ var ts;
112700
112720
  return equalityComparer(file.fileName, getDefaultLibraryFileName());
112701
112721
  }
112702
112722
  else {
112703
- return ts.some(options.lib, function (libFileName) { return equalityComparer(file.fileName, ts.combinePaths(defaultLibraryPath, libFileName)); });
112723
+ return ts.some(options.lib, function (libFileName) { return equalityComparer(file.fileName, pathForLibFile(libFileName)); });
112704
112724
  }
112705
112725
  }
112706
112726
  function getDiagnosticsProducingTypeChecker() {
@@ -113282,7 +113302,7 @@ var ts;
113282
113302
  var libName = ts.toFileNameLowerCase(ref.fileName);
113283
113303
  var libFileName = ts.libMap.get(libName);
113284
113304
  if (libFileName) {
113285
- return getSourceFile(ts.combinePaths(defaultLibraryPath, libFileName));
113305
+ return getSourceFile(pathForLibFile(libFileName));
113286
113306
  }
113287
113307
  }
113288
113308
  /** This should have similar behavior to 'processSourceFile' without diagnostics or mutation. */
@@ -113693,13 +113713,31 @@ var ts;
113693
113713
  resolvedTypeReferenceDirectives.set(typeReferenceDirective, resolvedTypeReferenceDirective);
113694
113714
  }
113695
113715
  }
113716
+ function pathForLibFile(libFileName) {
113717
+ // Support resolving to lib.dom.d.ts -> @typescript/dom, and
113718
+ // lib.dom.iterable.d.ts -> @typescript/dom/iterable
113719
+ // lib.es2015.symbol.wellknown.d.ts -> @typescript/es2015/symbol-wellknown
113720
+ var components = libFileName.split(".");
113721
+ var path = components[1];
113722
+ var i = 2;
113723
+ while (components[i] && components[i] !== "d") {
113724
+ path += (i === 2 ? "/" : "-") + components[i];
113725
+ i++;
113726
+ }
113727
+ var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_" + libFileName + "__.ts");
113728
+ var localOverrideModuleResult = ts.resolveModuleName("@typescript/" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
113729
+ if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
113730
+ return localOverrideModuleResult.resolvedModule.resolvedFileName;
113731
+ }
113732
+ return ts.combinePaths(defaultLibraryPath, libFileName);
113733
+ }
113696
113734
  function processLibReferenceDirectives(file) {
113697
113735
  ts.forEach(file.libReferenceDirectives, function (libReference, index) {
113698
113736
  var libName = ts.toFileNameLowerCase(libReference.fileName);
113699
113737
  var libFileName = ts.libMap.get(libName);
113700
113738
  if (libFileName) {
113701
113739
  // we ignore any 'no-default-lib' reference set on this file.
113702
- processRootFile(ts.combinePaths(defaultLibraryPath, libFileName), /*isDefaultLib*/ true, /*ignoreNoDefaultLib*/ true, { kind: ts.FileIncludeKind.LibReferenceDirective, file: file.path, index: index, });
113740
+ processRootFile(pathForLibFile(libFileName), /*isDefaultLib*/ true, /*ignoreNoDefaultLib*/ true, { kind: ts.FileIncludeKind.LibReferenceDirective, file: file.path, index: index, });
113703
113741
  }
113704
113742
  else {
113705
113743
  var unqualifiedLibName = ts.removeSuffix(ts.removePrefix(libName, "lib."), ".d.ts");
@@ -1469,6 +1469,7 @@
1469
1469
  "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "类型“{0}”不是数组类型或字符串类型,或者没有返回迭代器的 \"[Symbol.iterator]()\" 方法。",
1470
1470
  "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548": "类型“{0}”不是数组类型,或者没有返回迭代器的 \"[Symbol.iterator]()\" 方法。",
1471
1471
  "Type_0_is_not_assignable_to_type_1_2322": "不能将类型“{0}”分配给类型“{1}”。",
1472
+ "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820": "类型“{0}”不可分配给类型“{1}”。你的意思是“{2}”?",
1472
1473
  "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719": "类型“{0}”无法分配给类型“{1}”。存在具有此名称的两种不同类型,但它们是不相关的。",
1473
1474
  "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375": "类型 “{0}” 不能分配给“exactOptionalPropertyTypes: true”的类型 “{1}”。请考虑将 “undefined” 添加到目标属性的类型。",
1474
1475
  "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "类型 “{0}” 不能分配给“exactOptionalPropertyTypes: true”的类型 “{1}”。请考虑将 “undefined” 添加到目标类型。。",
@@ -1426,15 +1426,20 @@
1426
1426
  "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371": "因為 'importsNotUsedAsValues' 設為 'error',所以永遠不會使用此匯入作為值,且必須使用 'import type'。",
1427
1427
  "This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_fil_6233": "此宣告正在增加中。請考慮將正在增加的宣告移至相同的檔案中。",
1428
1428
  "This_may_be_converted_to_an_async_function_80006": "這可以轉換為非同步函式。",
1429
+ "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122": "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'.",
1430
+ "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123": "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?",
1431
+ "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121": "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class.",
1429
1432
  "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113": "因為此成員並未在基底類別 '{0}' 中宣告,所以其不得具有 'override' 修飾元。",
1430
1433
  "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117": "此成員不能具有 'override' 修飾元,因為並未在基底類別 '{0}' 中宣告此成員。您指的是 '{1}' 嗎?",
1431
1434
  "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112": "因為此成員包含的類別 '{0}' 並未延伸其他類別,所以其不得具有 'override' 修飾元。",
1435
+ "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119": "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'.",
1432
1436
  "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114": "因為此成員會覆寫基底類別 '{0}' 中的成員,所以其必須具有 'override' 修飾元。",
1433
1437
  "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116": "因為此成員會覆寫基底類別 '{0}' 中宣告的抽象方法,所以其必須具有 'override' 修飾元。",
1434
1438
  "This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_2497": "只能以 ECMAScript 匯入/匯出來參考此模組,方法為開啟 '{0}' 旗標並參考其預設匯出。",
1435
1439
  "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594": "此模組使用 'export =' 宣告,只能在使用 '{0}' 旗標時搭配預設匯入使用。",
1436
1440
  "This_overload_signature_is_not_compatible_with_its_implementation_signature_2394": "此多載簽章與其實作簽章不相容。",
1437
1441
  "This_parameter_is_not_allowed_with_use_strict_directive_1346": "不允許此參數搭配 'use strict' 指示詞使用。",
1442
+ "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120": "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'.",
1438
1443
  "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115": "因為此參數屬性會覆寫基底類別 '{0}' 中的成員,所以其必須具有 'override' 修飾元。",
1439
1444
  "This_spread_always_overwrites_this_property_2785": "此展開會永遠覆寫此屬性。",
1440
1445
  "This_syntax_requires_an_imported_helper_but_module_0_cannot_be_found_2354": "此語法需要已匯入的協助程式,但找不到模組 '{0}'。",
@@ -1469,6 +1474,7 @@
1469
1474
  "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549": "類型 '{0}' 不是陣列類型或字串類型,或沒有會傳回迭代器的 '[Symbol.iterator]()' 方法。",
1470
1475
  "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548": "類型 '{0}' 不是陣列類型,或沒有會傳回迭代器的 '[Symbol.iterator]()' 方法。",
1471
1476
  "Type_0_is_not_assignable_to_type_1_2322": "類型 '{0}' 不可指派給類型 '{1}'。",
1477
+ "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820": "不得將類型 '{0}' 指派給類型 '{1}'。您指的是 '{2}' 嗎?",
1472
1478
  "Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated_2719": "無法將類型 '{0}' 指派給類型 '{1}'。有兩種使用此名稱的不同類型存在,但彼此並不相關。",
1473
1479
  "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375": "類型 '{0}' 無法指派給類型為具有 'exactOptionalPropertyTypes: true' 的類型 '{1}'。請考慮將 'undefined' 新增到目標屬性的類型。",
1474
1480
  "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412": "類型 '{0}' 無法指派給類型為具有 'exactOptionalPropertyTypes: true' 的類型 '{1}'。請考慮將 'undefined' 新增到目標的類型。",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@typescript-deploys/pr-build",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "4.5.0-pr-45836-7",
5
+ "version": "4.5.0-pr-45903-8",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -84,7 +84,7 @@
84
84
  "mkdirp": "latest",
85
85
  "mocha": "latest",
86
86
  "mocha-fivemat-progress-reporter": "latest",
87
- "ms": "latest",
87
+ "ms": "^2.1.3",
88
88
  "node-fetch": "^2.6.1",
89
89
  "plugin-error": "latest",
90
90
  "pretty-hrtime": "^1.0.3",