typescript 4.8.0-dev.20220630 → 4.8.0-dev.20220701

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.20220630";
92
+ ts.version = ts.versionMajorMinor + ".0-dev.20220701";
93
93
  /* @internal */
94
94
  var Comparison;
95
95
  (function (Comparison) {
@@ -5256,9 +5256,10 @@ var ts;
5256
5256
  (function (TypeMapKind) {
5257
5257
  TypeMapKind[TypeMapKind["Simple"] = 0] = "Simple";
5258
5258
  TypeMapKind[TypeMapKind["Array"] = 1] = "Array";
5259
- TypeMapKind[TypeMapKind["Function"] = 2] = "Function";
5260
- TypeMapKind[TypeMapKind["Composite"] = 3] = "Composite";
5261
- TypeMapKind[TypeMapKind["Merged"] = 4] = "Merged";
5259
+ TypeMapKind[TypeMapKind["Deferred"] = 2] = "Deferred";
5260
+ TypeMapKind[TypeMapKind["Function"] = 3] = "Function";
5261
+ TypeMapKind[TypeMapKind["Composite"] = 4] = "Composite";
5262
+ TypeMapKind[TypeMapKind["Merged"] = 5] = "Merged";
5262
5263
  })(TypeMapKind = ts.TypeMapKind || (ts.TypeMapKind = {}));
5263
5264
  var InferencePriority;
5264
5265
  (function (InferencePriority) {
@@ -48661,6 +48662,24 @@ var ts;
48661
48662
  var Symbol = ts.objectAllocator.getSymbolConstructor();
48662
48663
  var Type = ts.objectAllocator.getTypeConstructor();
48663
48664
  var Signature = ts.objectAllocator.getSignatureConstructor();
48665
+ var DebugTypeMapper = /** @class */ (function () {
48666
+ function DebugTypeMapper() {
48667
+ }
48668
+ DebugTypeMapper.prototype.__debugToString = function () {
48669
+ var _a;
48670
+ ts.Debug.type(this);
48671
+ switch (this.kind) {
48672
+ case 3 /* Function */: return ((_a = this.debugInfo) === null || _a === void 0 ? void 0 : _a.call(this)) || "(function mapper)";
48673
+ case 0 /* Simple */: return this.source.__debugTypeToString() + " -> " + this.target.__debugTypeToString();
48674
+ case 1 /* Array */: return ts.zipWith(this.sources, this.targets || ts.map(this.sources, function () { return anyType; }), function (s, t) { return s.__debugTypeToString() + " -> " + t.__debugTypeToString(); }).join(", ");
48675
+ case 2 /* Deferred */: return ts.zipWith(this.sources, this.targets, function (s, t) { return s.__debugTypeToString() + " -> " + t().__debugTypeToString(); }).join(", ");
48676
+ case 5 /* Merged */:
48677
+ case 4 /* Composite */: return "m1: " + this.mapper1.__debugToString().split("\n").join("\n ") + "\nm2: " + this.mapper2.__debugToString().split("\n").join("\n ");
48678
+ default: return ts.Debug.assertNever(this);
48679
+ }
48680
+ };
48681
+ return DebugTypeMapper;
48682
+ }());
48664
48683
  var typeCount = 0;
48665
48684
  var symbolCount = 0;
48666
48685
  var enumCount = 0;
@@ -49121,10 +49140,23 @@ var ts;
49121
49140
  var numberOrBigIntType = getUnionType([numberType, bigintType]);
49122
49141
  var templateConstraintType = getUnionType([stringType, numberType, booleanType, bigintType, nullType, undefinedType]);
49123
49142
  var numericStringType = getTemplateLiteralType(["", ""], [numberType]); // The `${number}` type
49124
- var restrictiveMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t; });
49125
- var permissiveMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 /* TypeParameter */ ? wildcardType : t; });
49143
+ var restrictiveMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 /* TypeParameter */ ? getRestrictiveTypeParameter(t) : t; }, function () { return "(restrictive mapper)"; });
49144
+ var permissiveMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 /* TypeParameter */ ? wildcardType : t; }, function () { return "(permissive mapper)"; });
49126
49145
  var uniqueLiteralType = createIntrinsicType(131072 /* Never */, "never"); // `uniqueLiteralType` is a special `never` flagged by union reduction to behave as a literal
49127
- var uniqueLiteralMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t; }); // replace all type parameters with the unique literal type (disregarding constraints)
49146
+ var uniqueLiteralMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 /* TypeParameter */ ? uniqueLiteralType : t; }, function () { return "(unique literal mapper)"; }); // replace all type parameters with the unique literal type (disregarding constraints)
49147
+ var outofbandVarianceMarkerHandler;
49148
+ var reportUnreliableMapper = makeFunctionTypeMapper(function (t) {
49149
+ if (outofbandVarianceMarkerHandler && (t === markerSuperType || t === markerSubType || t === markerOtherType)) {
49150
+ outofbandVarianceMarkerHandler(/*onlyUnreliable*/ true);
49151
+ }
49152
+ return t;
49153
+ }, function () { return "(unmeasurable reporter)"; });
49154
+ var reportUnmeasurableMapper = makeFunctionTypeMapper(function (t) {
49155
+ if (outofbandVarianceMarkerHandler && (t === markerSuperType || t === markerSubType || t === markerOtherType)) {
49156
+ outofbandVarianceMarkerHandler(/*onlyUnreliable*/ false);
49157
+ }
49158
+ return t;
49159
+ }, function () { return "(unreliable reporter)"; });
49128
49160
  var emptyObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
49129
49161
  var emptyJsxObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
49130
49162
  emptyJsxObjectType.objectFlags |= 2048 /* JsxAttributes */;
@@ -49284,7 +49316,6 @@ var ts;
49284
49316
  var typeofType = createTypeofType();
49285
49317
  var _jsxNamespace;
49286
49318
  var _jsxFactoryEntity;
49287
- var outofbandVarianceMarkerHandler;
49288
49319
  var subtypeRelation = new ts.Map();
49289
49320
  var strictSubtypeRelation = new ts.Map();
49290
49321
  var assignableRelation = new ts.Map();
@@ -53051,7 +53082,7 @@ var ts;
53051
53082
  var name = typeParameterToName(newParam, context);
53052
53083
  var newTypeVariable = ts.factory.createTypeReferenceNode(name);
53053
53084
  context.approximateLength += 37; // 15 each for two added conditionals, 7 for an added infer type
53054
- var newMapper = prependTypeMapping(type.root.checkType, newParam, type.combinedMapper || type.mapper);
53085
+ var newMapper = prependTypeMapping(type.root.checkType, newParam, type.mapper);
53055
53086
  var saveInferTypeParameters_1 = context.inferTypeParameters;
53056
53087
  context.inferTypeParameters = type.root.inferTypeParameters;
53057
53088
  var extendsTypeNode_1 = typeToTypeNodeHelper(instantiateType(type.root.extendsType, newMapper), context);
@@ -60462,8 +60493,7 @@ var ts;
60462
60493
  var _a;
60463
60494
  var inferences;
60464
60495
  if ((_a = typeParameter.symbol) === null || _a === void 0 ? void 0 : _a.declarations) {
60465
- for (var _i = 0, _b = typeParameter.symbol.declarations; _i < _b.length; _i++) {
60466
- var declaration = _b[_i];
60496
+ var _loop_15 = function (declaration) {
60467
60497
  if (declaration.parent.kind === 190 /* InferType */) {
60468
60498
  // When an 'infer T' declaration is immediately contained in a type reference node
60469
60499
  // (such as 'Foo<infer T>'), T's constraint is inferred from the constraint of the
@@ -60471,12 +60501,12 @@ var ts;
60471
60501
  // present, we form an intersection of the inferred constraint types.
60472
60502
  var _c = ts.walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent), _d = _c[0], childTypeParameter = _d === void 0 ? declaration.parent : _d, grandParent = _c[1];
60473
60503
  if (grandParent.kind === 178 /* TypeReference */ && !omitTypeReferences) {
60474
- var typeReference = grandParent;
60475
- var typeParameters = getTypeParametersForTypeReference(typeReference);
60476
- if (typeParameters) {
60477
- var index = typeReference.typeArguments.indexOf(childTypeParameter);
60478
- if (index < typeParameters.length) {
60479
- var declaredConstraint = getConstraintOfTypeParameter(typeParameters[index]);
60504
+ var typeReference_1 = grandParent;
60505
+ var typeParameters_1 = getTypeParametersForTypeReference(typeReference_1);
60506
+ if (typeParameters_1) {
60507
+ var index = typeReference_1.typeArguments.indexOf(childTypeParameter);
60508
+ if (index < typeParameters_1.length) {
60509
+ var declaredConstraint = getConstraintOfTypeParameter(typeParameters_1[index]);
60480
60510
  if (declaredConstraint) {
60481
60511
  // Type parameter constraints can reference other type parameters so
60482
60512
  // constraints need to be instantiated. If instantiation produces the
@@ -60484,7 +60514,9 @@ var ts;
60484
60514
  // type Foo<T extends string, U extends T> = [T, U];
60485
60515
  // type Bar<T> = T extends Foo<infer X, infer X> ? Foo<X, X> : T;
60486
60516
  // the instantiated constraint for U is X, so we discard that inference.
60487
- var mapper = createTypeMapper(typeParameters, getEffectiveTypeArguments(typeReference, typeParameters));
60517
+ var mapper = makeDeferredTypeMapper(typeParameters_1, typeParameters_1.map(function (_, index) { return function () {
60518
+ return getEffectiveTypeArgumentAtIndex(typeReference_1, typeParameters_1, index);
60519
+ }; }));
60488
60520
  var constraint = instantiateType(declaredConstraint, mapper);
60489
60521
  if (constraint !== typeParameter) {
60490
60522
  inferences = ts.append(inferences, constraint);
@@ -60522,6 +60554,10 @@ var ts;
60522
60554
  inferences = ts.append(inferences, instantiateType(nodeType, makeUnaryTypeMapper(getDeclaredTypeOfTypeParameter(getSymbolOfNode(checkMappedType_1.typeParameter)), checkMappedType_1.typeParameter.constraint ? getTypeFromTypeNode(checkMappedType_1.typeParameter.constraint) : keyofConstraintType)));
60523
60555
  }
60524
60556
  }
60557
+ };
60558
+ for (var _i = 0, _b = typeParameter.symbol.declarations; _i < _b.length; _i++) {
60559
+ var declaration = _b[_i];
60560
+ _loop_15(declaration);
60525
60561
  }
60526
60562
  }
60527
60563
  return inferences && getIntersectionType(inferences);
@@ -61410,7 +61446,7 @@ var ts;
61410
61446
  var lastRequiredIndex = -1;
61411
61447
  var firstRestIndex = -1;
61412
61448
  var lastOptionalOrRestIndex = -1;
61413
- var _loop_15 = function (i) {
61449
+ var _loop_16 = function (i) {
61414
61450
  var type = elementTypes[i];
61415
61451
  var flags = target.elementFlags[i];
61416
61452
  if (flags & 8 /* Variadic */) {
@@ -61440,7 +61476,7 @@ var ts;
61440
61476
  }
61441
61477
  };
61442
61478
  for (var i = 0; i < elementTypes.length; i++) {
61443
- var state_4 = _loop_15(i);
61479
+ var state_4 = _loop_16(i);
61444
61480
  if (typeof state_4 === "object")
61445
61481
  return state_4.value;
61446
61482
  }
@@ -61636,7 +61672,7 @@ var ts;
61636
61672
  var templates = ts.filter(types, isPatternLiteralType);
61637
61673
  if (templates.length) {
61638
61674
  var i = types.length;
61639
- var _loop_16 = function () {
61675
+ var _loop_17 = function () {
61640
61676
  i--;
61641
61677
  var t = types[i];
61642
61678
  if (t.flags & 128 /* StringLiteral */ && ts.some(templates, function (template) { return isTypeMatchedByTemplateLiteralType(t, template); })) {
@@ -61644,7 +61680,7 @@ var ts;
61644
61680
  }
61645
61681
  };
61646
61682
  while (i > 0) {
61647
- _loop_16();
61683
+ _loop_17();
61648
61684
  }
61649
61685
  }
61650
61686
  }
@@ -61721,14 +61757,14 @@ var ts;
61721
61757
  var namedUnions = [];
61722
61758
  addNamedUnions(namedUnions, types);
61723
61759
  var reducedTypes = [];
61724
- var _loop_17 = function (t) {
61760
+ var _loop_18 = function (t) {
61725
61761
  if (!ts.some(namedUnions, function (union) { return containsType(union.types, t); })) {
61726
61762
  reducedTypes.push(t);
61727
61763
  }
61728
61764
  };
61729
61765
  for (var _i = 0, typeSet_1 = typeSet; _i < typeSet_1.length; _i++) {
61730
61766
  var t = typeSet_1[_i];
61731
- _loop_17(t);
61767
+ _loop_18(t);
61732
61768
  }
61733
61769
  if (!aliasSymbol && namedUnions.length === 1 && reducedTypes.length === 0) {
61734
61770
  return namedUnions[0];
@@ -62952,7 +62988,7 @@ var ts;
62952
62988
  var result;
62953
62989
  var extraTypes;
62954
62990
  var tailCount = 0;
62955
- var _loop_18 = function () {
62991
+ var _loop_19 = function () {
62956
62992
  if (tailCount === 1000) {
62957
62993
  error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
62958
62994
  result = errorType;
@@ -63073,7 +63109,7 @@ var ts;
63073
63109
  // another (or, through recursion, possibly the same) conditional type. In the potentially tail-recursive
63074
63110
  // cases we increment the tail recursion counter and stop after 1000 iterations.
63075
63111
  while (true) {
63076
- var state_5 = _loop_18();
63112
+ var state_5 = _loop_19();
63077
63113
  if (typeof state_5 === "object")
63078
63114
  return state_5.value;
63079
63115
  if (state_5 === "break")
@@ -63703,7 +63739,7 @@ var ts;
63703
63739
  switch (mapper.kind) {
63704
63740
  case 0 /* Simple */:
63705
63741
  return type === mapper.source ? mapper.target : type;
63706
- case 1 /* Array */:
63742
+ case 1 /* Array */: {
63707
63743
  var sources = mapper.sources;
63708
63744
  var targets = mapper.targets;
63709
63745
  for (var i = 0; i < sources.length; i++) {
@@ -63712,25 +63748,45 @@ var ts;
63712
63748
  }
63713
63749
  }
63714
63750
  return type;
63715
- case 2 /* Function */:
63751
+ }
63752
+ case 2 /* Deferred */: {
63753
+ var sources = mapper.sources;
63754
+ var targets = mapper.targets;
63755
+ for (var i = 0; i < sources.length; i++) {
63756
+ if (type === sources[i]) {
63757
+ return targets[i]();
63758
+ }
63759
+ }
63760
+ return type;
63761
+ }
63762
+ case 3 /* Function */:
63716
63763
  return mapper.func(type);
63717
- case 3 /* Composite */:
63718
- case 4 /* Merged */:
63764
+ case 4 /* Composite */:
63765
+ case 5 /* Merged */:
63719
63766
  var t1 = getMappedType(type, mapper.mapper1);
63720
- return t1 !== type && mapper.kind === 3 /* Composite */ ? instantiateType(t1, mapper.mapper2) : getMappedType(t1, mapper.mapper2);
63767
+ return t1 !== type && mapper.kind === 4 /* Composite */ ? instantiateType(t1, mapper.mapper2) : getMappedType(t1, mapper.mapper2);
63768
+ }
63769
+ }
63770
+ function attachDebugPrototypeIfDebug(mapper) {
63771
+ if (ts.Debug.isDebugging) {
63772
+ return Object.setPrototypeOf(mapper, DebugTypeMapper.prototype);
63721
63773
  }
63774
+ return mapper;
63722
63775
  }
63723
63776
  function makeUnaryTypeMapper(source, target) {
63724
- return { kind: 0 /* Simple */, source: source, target: target };
63777
+ return attachDebugPrototypeIfDebug({ kind: 0 /* Simple */, source: source, target: target });
63725
63778
  }
63726
63779
  function makeArrayTypeMapper(sources, targets) {
63727
- return { kind: 1 /* Array */, sources: sources, targets: targets };
63780
+ return attachDebugPrototypeIfDebug({ kind: 1 /* Array */, sources: sources, targets: targets });
63781
+ }
63782
+ function makeFunctionTypeMapper(func, debugInfo) {
63783
+ return attachDebugPrototypeIfDebug({ kind: 3 /* Function */, func: func, debugInfo: ts.Debug.isDebugging ? debugInfo : undefined });
63728
63784
  }
63729
- function makeFunctionTypeMapper(func) {
63730
- return { kind: 2 /* Function */, func: func };
63785
+ function makeDeferredTypeMapper(sources, targets) {
63786
+ return attachDebugPrototypeIfDebug({ kind: 2 /* Deferred */, sources: sources, targets: targets });
63731
63787
  }
63732
63788
  function makeCompositeTypeMapper(kind, mapper1, mapper2) {
63733
- return { kind: kind, mapper1: mapper1, mapper2: mapper2 };
63789
+ return attachDebugPrototypeIfDebug({ kind: kind, mapper1: mapper1, mapper2: mapper2 });
63734
63790
  }
63735
63791
  function createTypeEraser(sources) {
63736
63792
  return createTypeMapper(sources, /*targets*/ undefined);
@@ -63740,19 +63796,20 @@ var ts;
63740
63796
  * This is used during inference when instantiating type parameter defaults.
63741
63797
  */
63742
63798
  function createBackreferenceMapper(context, index) {
63743
- return makeFunctionTypeMapper(function (t) { return ts.findIndex(context.inferences, function (info) { return info.typeParameter === t; }) >= index ? unknownType : t; });
63799
+ var forwardInferences = context.inferences.slice(index);
63800
+ return createTypeMapper(ts.map(forwardInferences, function (i) { return i.typeParameter; }), ts.map(forwardInferences, function () { return unknownType; }));
63744
63801
  }
63745
63802
  function combineTypeMappers(mapper1, mapper2) {
63746
- return mapper1 ? makeCompositeTypeMapper(3 /* Composite */, mapper1, mapper2) : mapper2;
63803
+ return mapper1 ? makeCompositeTypeMapper(4 /* Composite */, mapper1, mapper2) : mapper2;
63747
63804
  }
63748
63805
  function mergeTypeMappers(mapper1, mapper2) {
63749
- return mapper1 ? makeCompositeTypeMapper(4 /* Merged */, mapper1, mapper2) : mapper2;
63806
+ return mapper1 ? makeCompositeTypeMapper(5 /* Merged */, mapper1, mapper2) : mapper2;
63750
63807
  }
63751
63808
  function prependTypeMapping(source, target, mapper) {
63752
- return !mapper ? makeUnaryTypeMapper(source, target) : makeCompositeTypeMapper(4 /* Merged */, makeUnaryTypeMapper(source, target), mapper);
63809
+ return !mapper ? makeUnaryTypeMapper(source, target) : makeCompositeTypeMapper(5 /* Merged */, makeUnaryTypeMapper(source, target), mapper);
63753
63810
  }
63754
63811
  function appendTypeMapping(mapper, source, target) {
63755
- return !mapper ? makeUnaryTypeMapper(source, target) : makeCompositeTypeMapper(4 /* Merged */, mapper, makeUnaryTypeMapper(source, target));
63812
+ return !mapper ? makeUnaryTypeMapper(source, target) : makeCompositeTypeMapper(5 /* Merged */, mapper, makeUnaryTypeMapper(source, target));
63756
63813
  }
63757
63814
  function getRestrictiveTypeParameter(tp) {
63758
63815
  return tp.constraint === unknownType ? tp : tp.restrictiveInstantiation || (tp.restrictiveInstantiation = createTypeParameter(tp.symbol),
@@ -65648,7 +65705,7 @@ var ts;
65648
65705
  reducedTarget = findMatchingDiscriminantType(source, target, isRelatedTo) || filterPrimitivesIfContainsNonPrimitive(target);
65649
65706
  checkTypes = reducedTarget.flags & 1048576 /* Union */ ? reducedTarget.types : [reducedTarget];
65650
65707
  }
65651
- var _loop_19 = function (prop) {
65708
+ var _loop_20 = function (prop) {
65652
65709
  if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) {
65653
65710
  if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) {
65654
65711
  if (reportErrors) {
@@ -65711,7 +65768,7 @@ var ts;
65711
65768
  };
65712
65769
  for (var _i = 0, _b = getPropertiesOfType(source); _i < _b.length; _i++) {
65713
65770
  var prop = _b[_i];
65714
- var state_6 = _loop_19(prop);
65771
+ var state_6 = _loop_20(prop);
65715
65772
  if (typeof state_6 === "object")
65716
65773
  return state_6.value;
65717
65774
  }
@@ -65943,10 +66000,10 @@ var ts;
65943
66000
  // We're in the middle of variance checking - integrate any unmeasurable/unreliable flags from this cached component
65944
66001
  var saved = entry & 24 /* ReportsMask */;
65945
66002
  if (saved & 8 /* ReportsUnmeasurable */) {
65946
- instantiateType(source, makeFunctionTypeMapper(reportUnmeasurableMarkers));
66003
+ instantiateType(source, reportUnmeasurableMapper);
65947
66004
  }
65948
66005
  if (saved & 16 /* ReportsUnreliable */) {
65949
- instantiateType(source, makeFunctionTypeMapper(reportUnreliableMarkers));
66006
+ instantiateType(source, reportUnreliableMapper);
65950
66007
  }
65951
66008
  }
65952
66009
  return entry & 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */;
@@ -66372,7 +66429,7 @@ var ts;
66372
66429
  }
66373
66430
  // Report unreliable variance for type variables referenced in template literal type placeholders.
66374
66431
  // For example, `foo-${number}` is related to `foo-${string}` even though number isn't related to string.
66375
- instantiateType(source, makeFunctionTypeMapper(reportUnreliableMarkers));
66432
+ instantiateType(source, reportUnreliableMapper);
66376
66433
  }
66377
66434
  if (isTypeMatchedByTemplateLiteralType(source, target)) {
66378
66435
  return -1 /* True */;
@@ -66644,18 +66701,6 @@ var ts;
66644
66701
  }
66645
66702
  }
66646
66703
  }
66647
- function reportUnmeasurableMarkers(p) {
66648
- if (outofbandVarianceMarkerHandler && (p === markerSuperType || p === markerSubType || p === markerOtherType)) {
66649
- outofbandVarianceMarkerHandler(/*onlyUnreliable*/ false);
66650
- }
66651
- return p;
66652
- }
66653
- function reportUnreliableMarkers(p) {
66654
- if (outofbandVarianceMarkerHandler && (p === markerSuperType || p === markerSubType || p === markerOtherType)) {
66655
- outofbandVarianceMarkerHandler(/*onlyUnreliable*/ true);
66656
- }
66657
- return p;
66658
- }
66659
66704
  // A type [P in S]: X is related to a type [Q in T]: Y if T is related to S and X' is
66660
66705
  // related to Y, where X' is an instantiation of X in which P is replaced with Q. Notice
66661
66706
  // that S and T are contra-variant whereas X and Y are co-variant.
@@ -66665,7 +66710,7 @@ var ts;
66665
66710
  if (modifiersRelated) {
66666
66711
  var result_10;
66667
66712
  var targetConstraint = getConstraintTypeFromMappedType(target);
66668
- var sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), makeFunctionTypeMapper(getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMarkers : reportUnreliableMarkers));
66713
+ var sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMapper : reportUnreliableMapper);
66669
66714
  if (result_10 = isRelatedTo(targetConstraint, sourceConstraint, 3 /* Both */, reportErrors)) {
66670
66715
  var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]);
66671
66716
  if (instantiateType(getNameTypeFromMappedType(source), mapper) === instantiateType(getNameTypeFromMappedType(target), mapper)) {
@@ -66719,11 +66764,11 @@ var ts;
66719
66764
  // constituents of 'target'. If any combination does not have a match then 'source' is not relatable.
66720
66765
  var discriminantCombinations = ts.cartesianProduct(sourceDiscriminantTypes);
66721
66766
  var matchingTypes = [];
66722
- var _loop_20 = function (combination) {
66767
+ var _loop_21 = function (combination) {
66723
66768
  var hasMatch = false;
66724
66769
  outer: for (var _c = 0, _d = target.types; _c < _d.length; _c++) {
66725
66770
  var type = _d[_c];
66726
- var _loop_21 = function (i) {
66771
+ var _loop_22 = function (i) {
66727
66772
  var sourceProperty = sourcePropertiesFiltered[i];
66728
66773
  var targetProperty = getPropertyOfType(type, sourceProperty.escapedName);
66729
66774
  if (!targetProperty)
@@ -66739,7 +66784,7 @@ var ts;
66739
66784
  }
66740
66785
  };
66741
66786
  for (var i = 0; i < sourcePropertiesFiltered.length; i++) {
66742
- var state_8 = _loop_21(i);
66787
+ var state_8 = _loop_22(i);
66743
66788
  switch (state_8) {
66744
66789
  case "continue-outer": continue outer;
66745
66790
  }
@@ -66753,7 +66798,7 @@ var ts;
66753
66798
  };
66754
66799
  for (var _a = 0, discriminantCombinations_1 = discriminantCombinations; _a < discriminantCombinations_1.length; _a++) {
66755
66800
  var combination = discriminantCombinations_1[_a];
66756
- var state_7 = _loop_20(combination);
66801
+ var state_7 = _loop_21(combination);
66757
66802
  if (typeof state_7 === "object")
66758
66803
  return state_7.value;
66759
66804
  }
@@ -67201,7 +67246,7 @@ var ts;
67201
67246
  * See signatureAssignableTo, compareSignaturesIdentical
67202
67247
  */
67203
67248
  function signatureRelatedTo(source, target, erase, reportErrors, incompatibleReporter) {
67204
- return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, relation === strictSubtypeRelation ? 8 /* StrictArity */ : 0, reportErrors, reportError, incompatibleReporter, isRelatedToWorker, makeFunctionTypeMapper(reportUnreliableMarkers));
67249
+ return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, relation === strictSubtypeRelation ? 8 /* StrictArity */ : 0, reportErrors, reportError, incompatibleReporter, isRelatedToWorker, reportUnreliableMapper);
67205
67250
  }
67206
67251
  function signaturesIdenticalTo(source, target, kind) {
67207
67252
  var sourceSignatures = getSignaturesOfType(source, kind);
@@ -67460,7 +67505,7 @@ var ts;
67460
67505
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("checkTypes" /* CheckTypes */, "getVariancesWorker", { arity: typeParameters.length, id: getTypeId(getDeclaredTypeOfSymbol(symbol)) });
67461
67506
  links.variances = ts.emptyArray;
67462
67507
  var variances = [];
67463
- var _loop_22 = function (tp) {
67508
+ var _loop_23 = function (tp) {
67464
67509
  var modifiers = getVarianceModifiers(tp);
67465
67510
  var variance = modifiers & 65536 /* Out */ ?
67466
67511
  modifiers & 32768 /* In */ ? 0 /* Invariant */ : 1 /* Covariant */ :
@@ -67496,9 +67541,9 @@ var ts;
67496
67541
  }
67497
67542
  variances.push(variance);
67498
67543
  };
67499
- for (var _i = 0, typeParameters_1 = typeParameters; _i < typeParameters_1.length; _i++) {
67500
- var tp = typeParameters_1[_i];
67501
- _loop_22(tp);
67544
+ for (var _i = 0, typeParameters_2 = typeParameters; _i < typeParameters_2.length; _i++) {
67545
+ var tp = typeParameters_2[_i];
67546
+ _loop_23(tp);
67502
67547
  }
67503
67548
  links.variances = variances;
67504
67549
  ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop({ variances: variances.map(ts.Debug.formatVariance) });
@@ -68493,27 +68538,29 @@ var ts;
68493
68538
  signature: signature,
68494
68539
  flags: flags,
68495
68540
  compareTypes: compareTypes,
68496
- mapper: makeFunctionTypeMapper(function (t) { return mapToInferredType(context, t, /*fix*/ true); }),
68497
- nonFixingMapper: makeFunctionTypeMapper(function (t) { return mapToInferredType(context, t, /*fix*/ false); }),
68541
+ mapper: reportUnmeasurableMapper,
68542
+ nonFixingMapper: reportUnmeasurableMapper,
68498
68543
  };
68544
+ context.mapper = makeFixingMapperForContext(context);
68545
+ context.nonFixingMapper = makeNonFixingMapperForContext(context);
68499
68546
  return context;
68500
68547
  }
68501
- function mapToInferredType(context, t, fix) {
68502
- var inferences = context.inferences;
68503
- for (var i = 0; i < inferences.length; i++) {
68504
- var inference = inferences[i];
68505
- if (t === inference.typeParameter) {
68506
- if (fix && !inference.isFixed) {
68507
- // Before we commit to a particular inference (and thus lock out any further inferences),
68508
- // we infer from any intra-expression inference sites we have collected.
68509
- inferFromIntraExpressionSites(context);
68510
- clearCachedInferences(inferences);
68511
- inference.isFixed = true;
68512
- }
68513
- return getInferredType(context, i);
68548
+ function makeFixingMapperForContext(context) {
68549
+ return makeDeferredTypeMapper(ts.map(context.inferences, function (i) { return i.typeParameter; }), ts.map(context.inferences, function (inference, i) { return function () {
68550
+ if (!inference.isFixed) {
68551
+ // Before we commit to a particular inference (and thus lock out any further inferences),
68552
+ // we infer from any intra-expression inference sites we have collected.
68553
+ inferFromIntraExpressionSites(context);
68554
+ clearCachedInferences(context.inferences);
68555
+ inference.isFixed = true;
68514
68556
  }
68515
- }
68516
- return t;
68557
+ return getInferredType(context, i);
68558
+ }; }));
68559
+ }
68560
+ function makeNonFixingMapperForContext(context) {
68561
+ return makeDeferredTypeMapper(ts.map(context.inferences, function (i) { return i.typeParameter; }), ts.map(context.inferences, function (_, i) { return function () {
68562
+ return getInferredType(context, i);
68563
+ }; }));
68517
68564
  }
68518
68565
  function clearCachedInferences(inferences) {
68519
68566
  for (var _i = 0, inferences_1 = inferences; _i < inferences_1.length; _i++) {
@@ -69433,7 +69480,7 @@ var ts;
69433
69480
  // upon instantiation, would collapse all the placeholders to just 'string', and an assignment check might
69434
69481
  // succeed. That would be a pointless and confusing outcome.
69435
69482
  if (matches || ts.every(target.texts, function (s) { return s.length === 0; })) {
69436
- var _loop_23 = function (i) {
69483
+ var _loop_24 = function (i) {
69437
69484
  var source_1 = matches ? matches[i] : neverType;
69438
69485
  var target_3 = types[i];
69439
69486
  // If we are inferring from a string literal type to a type variable whose constraint includes one of the
@@ -69483,7 +69530,7 @@ var ts;
69483
69530
  inferFromTypes(source_1, target_3);
69484
69531
  };
69485
69532
  for (var i = 0; i < types.length; i++) {
69486
- _loop_23(i);
69533
+ _loop_24(i);
69487
69534
  }
69488
69535
  }
69489
69536
  }
@@ -70001,7 +70048,7 @@ var ts;
70001
70048
  function mapTypesByKeyProperty(types, name) {
70002
70049
  var map = new ts.Map();
70003
70050
  var count = 0;
70004
- var _loop_24 = function (type) {
70051
+ var _loop_25 = function (type) {
70005
70052
  if (type.flags & (524288 /* Object */ | 2097152 /* Intersection */ | 58982400 /* InstantiableNonPrimitive */)) {
70006
70053
  var discriminant = getTypeOfPropertyOfType(type, name);
70007
70054
  if (discriminant) {
@@ -70027,7 +70074,7 @@ var ts;
70027
70074
  };
70028
70075
  for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
70029
70076
  var type = types_15[_i];
70030
- var state_9 = _loop_24(type);
70077
+ var state_9 = _loop_25(type);
70031
70078
  if (typeof state_9 === "object")
70032
70079
  return state_9.value;
70033
70080
  }
@@ -76376,7 +76423,7 @@ var ts;
76376
76423
  if (spreadIndex >= 0) {
76377
76424
  // Create synthetic arguments from spreads of tuple types.
76378
76425
  var effectiveArgs_1 = args.slice(0, spreadIndex);
76379
- var _loop_25 = function (i) {
76426
+ var _loop_26 = function (i) {
76380
76427
  var arg = args[i];
76381
76428
  // We can call checkExpressionCached because spread expressions never have a contextual type.
76382
76429
  var spreadType = arg.kind === 225 /* SpreadElement */ && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression));
@@ -76393,7 +76440,7 @@ var ts;
76393
76440
  }
76394
76441
  };
76395
76442
  for (var i = spreadIndex; i < args.length; i++) {
76396
- _loop_25(i);
76443
+ _loop_26(i);
76397
76444
  }
76398
76445
  return effectiveArgs_1;
76399
76446
  }
@@ -76722,7 +76769,7 @@ var ts;
76722
76769
  var min_3 = Number.MAX_VALUE;
76723
76770
  var minIndex = 0;
76724
76771
  var i_1 = 0;
76725
- var _loop_26 = function (c) {
76772
+ var _loop_27 = function (c) {
76726
76773
  var chain_2 = function () { return ts.chainDiagnosticMessages(/*details*/ undefined, ts.Diagnostics.Overload_0_of_1_2_gave_the_following_error, i_1 + 1, candidates.length, signatureToString(c)); };
76727
76774
  var diags_2 = getSignatureApplicabilityError(node, args, c, assignableRelation, 0 /* Normal */, /*reportErrors*/ true, chain_2);
76728
76775
  if (diags_2) {
@@ -76740,7 +76787,7 @@ var ts;
76740
76787
  };
76741
76788
  for (var _a = 0, candidatesForArgumentError_1 = candidatesForArgumentError; _a < candidatesForArgumentError_1.length; _a++) {
76742
76789
  var c = candidatesForArgumentError_1[_a];
76743
- _loop_26(c);
76790
+ _loop_27(c);
76744
76791
  }
76745
76792
  var diags_3 = max > 1 ? allDiagnostics[minIndex] : ts.flatten(allDiagnostics);
76746
76793
  ts.Debug.assert(diags_3.length > 0, "No errors reported for 3 or fewer overload signatures");
@@ -76898,7 +76945,7 @@ var ts;
76898
76945
  }
76899
76946
  var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max;
76900
76947
  var parameters = [];
76901
- var _loop_27 = function (i) {
76948
+ var _loop_28 = function (i) {
76902
76949
  var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ?
76903
76950
  i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) :
76904
76951
  i < s.parameters.length ? s.parameters[i] : undefined; });
@@ -76906,7 +76953,7 @@ var ts;
76906
76953
  parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); })));
76907
76954
  };
76908
76955
  for (var i = 0; i < maxNonRestParam; i++) {
76909
- _loop_27(i);
76956
+ _loop_28(i);
76910
76957
  }
76911
76958
  var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; });
76912
76959
  var flags = 0 /* None */;
@@ -80259,8 +80306,8 @@ var ts;
80259
80306
  var result = [];
80260
80307
  var oldTypeParameters;
80261
80308
  var newTypeParameters;
80262
- for (var _i = 0, typeParameters_2 = typeParameters; _i < typeParameters_2.length; _i++) {
80263
- var tp = typeParameters_2[_i];
80309
+ for (var _i = 0, typeParameters_3 = typeParameters; _i < typeParameters_3.length; _i++) {
80310
+ var tp = typeParameters_3[_i];
80264
80311
  var name = tp.symbol.escapedName;
80265
80312
  if (hasTypeParameterByName(context.inferredTypeParameters, name) || hasTypeParameterByName(result, name)) {
80266
80313
  var newName = getUniqueTypeParameterName(ts.concatenate(context.inferredTypeParameters, result), name);
@@ -80939,7 +80986,7 @@ var ts;
80939
80986
  var indexSymbol = getIndexSymbol(getSymbolOfNode(node));
80940
80987
  if (indexSymbol === null || indexSymbol === void 0 ? void 0 : indexSymbol.declarations) {
80941
80988
  var indexSignatureMap_1 = new ts.Map();
80942
- var _loop_28 = function (declaration) {
80989
+ var _loop_29 = function (declaration) {
80943
80990
  if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
80944
80991
  forEachType(getTypeFromTypeNode(declaration.parameters[0].type), function (type) {
80945
80992
  var entry = indexSignatureMap_1.get(getTypeId(type));
@@ -80954,7 +81001,7 @@ var ts;
80954
81001
  };
80955
81002
  for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
80956
81003
  var declaration = _a[_i];
80957
- _loop_28(declaration);
81004
+ _loop_29(declaration);
80958
81005
  }
80959
81006
  indexSignatureMap_1.forEach(function (entry) {
80960
81007
  if (entry.declarations.length > 1) {
@@ -81177,6 +81224,12 @@ var ts;
81177
81224
  function checkMissingDeclaration(node) {
81178
81225
  checkDecorators(node);
81179
81226
  }
81227
+ function getEffectiveTypeArgumentAtIndex(node, typeParameters, index) {
81228
+ if (index < typeParameters.length) {
81229
+ return getTypeFromTypeNode(node.typeArguments[index]);
81230
+ }
81231
+ return getEffectiveTypeArguments(node, typeParameters)[index];
81232
+ }
81180
81233
  function getEffectiveTypeArguments(node, typeParameters) {
81181
81234
  return fillMissingTypeArguments(ts.map(node.typeArguments, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), ts.isInJSFile(node));
81182
81235
  }
@@ -82644,8 +82697,8 @@ var ts;
82644
82697
  return;
82645
82698
  var typeParameters = ts.getEffectiveTypeParameterDeclarations(node);
82646
82699
  var seenParentsWithEveryUnused = new ts.Set();
82647
- for (var _i = 0, typeParameters_3 = typeParameters; _i < typeParameters_3.length; _i++) {
82648
- var typeParameter = typeParameters_3[_i];
82700
+ for (var _i = 0, typeParameters_4 = typeParameters; _i < typeParameters_4.length; _i++) {
82701
+ var typeParameter = typeParameters_4[_i];
82649
82702
  if (!isTypeParameterUnused(typeParameter))
82650
82703
  continue;
82651
82704
  var name = ts.idText(typeParameter.name);
@@ -84464,7 +84517,7 @@ var ts;
84464
84517
  var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* Interface */ ? ts.getDeclarationOfKind(type.symbol, 258 /* InterfaceDeclaration */) : undefined;
84465
84518
  var localPropDeclaration = declaration && declaration.kind === 221 /* BinaryExpression */ ||
84466
84519
  name && name.kind === 162 /* ComputedPropertyName */ || getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
84467
- var _loop_29 = function (info) {
84520
+ var _loop_30 = function (info) {
84468
84521
  var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
84469
84522
  // We check only when (a) the property is declared in the containing type, or (b) the applicable index signature is declared
84470
84523
  // in the containing type, or (c) the containing type is an interface and no base interface contains both the property and
@@ -84477,7 +84530,7 @@ var ts;
84477
84530
  };
84478
84531
  for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
84479
84532
  var info = indexInfos_9[_i];
84480
- _loop_29(info);
84533
+ _loop_30(info);
84481
84534
  }
84482
84535
  }
84483
84536
  function checkIndexConstraintForIndexSignature(type, checkInfo) {
@@ -84485,7 +84538,7 @@ var ts;
84485
84538
  var indexInfos = getApplicableIndexInfos(type, checkInfo.keyType);
84486
84539
  var interfaceDeclaration = ts.getObjectFlags(type) & 2 /* Interface */ ? ts.getDeclarationOfKind(type.symbol, 258 /* InterfaceDeclaration */) : undefined;
84487
84540
  var localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : undefined;
84488
- var _loop_30 = function (info) {
84541
+ var _loop_31 = function (info) {
84489
84542
  if (info === checkInfo)
84490
84543
  return "continue";
84491
84544
  var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
@@ -84500,7 +84553,7 @@ var ts;
84500
84553
  };
84501
84554
  for (var _i = 0, indexInfos_10 = indexInfos; _i < indexInfos_10.length; _i++) {
84502
84555
  var info = indexInfos_10[_i];
84503
- _loop_30(info);
84556
+ _loop_31(info);
84504
84557
  }
84505
84558
  }
84506
84559
  function checkTypeNameIsReserved(name, message) {
@@ -84820,7 +84873,7 @@ var ts;
84820
84873
  var baseTypes = baseTypeNode && getBaseTypes(type);
84821
84874
  var baseWithThis = (baseTypes === null || baseTypes === void 0 ? void 0 : baseTypes.length) ? getTypeWithThisArgument(ts.first(baseTypes), type.thisType) : undefined;
84822
84875
  var baseStaticType = getBaseConstructorTypeOfClass(type);
84823
- var _loop_31 = function (member) {
84876
+ var _loop_32 = function (member) {
84824
84877
  if (ts.hasAmbientModifier(member)) {
84825
84878
  return "continue";
84826
84879
  }
@@ -84837,7 +84890,7 @@ var ts;
84837
84890
  };
84838
84891
  for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
84839
84892
  var member = _a[_i];
84840
- _loop_31(member);
84893
+ _loop_32(member);
84841
84894
  }
84842
84895
  }
84843
84896
  /**
@@ -84925,7 +84978,7 @@ var ts;
84925
84978
  function issueMemberSpecificError(node, typeWithThis, baseWithThis, broadDiag) {
84926
84979
  // iterate over all implemented properties and issue errors on each one which isn't compatible, rather than the class as a whole, if possible
84927
84980
  var issuedMemberError = false;
84928
- var _loop_32 = function (member) {
84981
+ var _loop_33 = function (member) {
84929
84982
  if (ts.isStatic(member)) {
84930
84983
  return "continue";
84931
84984
  }
@@ -84944,7 +84997,7 @@ var ts;
84944
84997
  };
84945
84998
  for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
84946
84999
  var member = _a[_i];
84947
- _loop_32(member);
85000
+ _loop_33(member);
84948
85001
  }
84949
85002
  if (!issuedMemberError) {
84950
85003
  // check again with diagnostics to generate a less-specific error
@@ -85015,7 +85068,7 @@ var ts;
85015
85068
  var _a, _b, _c, _d;
85016
85069
  // NOTE: assignability is checked in checkClassDeclaration
85017
85070
  var baseProperties = getPropertiesOfType(baseType);
85018
- var _loop_33 = function (baseProperty) {
85071
+ var _loop_34 = function (baseProperty) {
85019
85072
  var base = getTargetSymbol(baseProperty);
85020
85073
  if (base.flags & 4194304 /* Prototype */) {
85021
85074
  return "continue";
@@ -85125,7 +85178,7 @@ var ts;
85125
85178
  };
85126
85179
  basePropertyCheck: for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
85127
85180
  var baseProperty = baseProperties_1[_i];
85128
- var state_10 = _loop_33(baseProperty);
85181
+ var state_10 = _loop_34(baseProperty);
85129
85182
  switch (state_10) {
85130
85183
  case "continue-basePropertyCheck": continue basePropertyCheck;
85131
85184
  }
@@ -111640,7 +111693,6 @@ var ts;
111640
111693
  if (newBuildInfo.program && changedDtsText !== undefined && config.options.composite) {
111641
111694
  // Update the output signature
111642
111695
  newBuildInfo.program.outSignature = ts.computeSignature(changedDtsText, createHash, changedDtsData);
111643
- newBuildInfo.program.dtsChangeTime = ts.getCurrentTime(host).getTime();
111644
111696
  }
111645
111697
  // Update sourceFileInfo
111646
111698
  var _a = buildInfo.bundle, js = _a.js, dts = _a.dts, sourceFiles = _a.sourceFiles;
@@ -121027,7 +121079,7 @@ var ts;
121027
121079
  state.outSignature = oldState === null || oldState === void 0 ? void 0 : oldState.outSignature;
121028
121080
  }
121029
121081
  state.changedFilesSet = new ts.Set();
121030
- state.dtsChangeTime = compilerOptions.composite ? oldState === null || oldState === void 0 ? void 0 : oldState.dtsChangeTime : undefined;
121082
+ state.latestChangedDtsFile = compilerOptions.composite ? oldState === null || oldState === void 0 ? void 0 : oldState.latestChangedDtsFile : undefined;
121031
121083
  var useOldState = ts.BuilderState.canReuseOldState(state.referencedMap, oldState);
121032
121084
  var oldCompilerOptions = useOldState ? oldState.compilerOptions : undefined;
121033
121085
  var canCopySemanticDiagnostics = useOldState && oldState.semanticDiagnosticsPerFile && !!state.semanticDiagnosticsPerFile &&
@@ -121151,7 +121203,7 @@ var ts;
121151
121203
  programEmitComplete: state.programEmitComplete,
121152
121204
  emitSignatures: state.emitSignatures && new ts.Map(state.emitSignatures),
121153
121205
  outSignature: state.outSignature,
121154
- dtsChangeTime: state.dtsChangeTime,
121206
+ latestChangedDtsFile: state.latestChangedDtsFile,
121155
121207
  hasChangedEmitSignature: state.hasChangedEmitSignature,
121156
121208
  changedFilesSet: outFilePath ? new ts.Set(state.changedFilesSet) : undefined,
121157
121209
  };
@@ -121164,7 +121216,7 @@ var ts;
121164
121216
  state.programEmitComplete = savedEmitState.programEmitComplete;
121165
121217
  state.emitSignatures = savedEmitState.emitSignatures;
121166
121218
  state.outSignature = savedEmitState.outSignature;
121167
- state.dtsChangeTime = savedEmitState.dtsChangeTime;
121219
+ state.latestChangedDtsFile = savedEmitState.latestChangedDtsFile;
121168
121220
  state.hasChangedEmitSignature = savedEmitState.hasChangedEmitSignature;
121169
121221
  if (savedEmitState.changedFilesSet)
121170
121222
  state.changedFilesSet = savedEmitState.changedFilesSet;
@@ -121478,14 +121530,14 @@ var ts;
121478
121530
  /**
121479
121531
  * Gets the program information to be emitted in buildInfo so that we can use it to create new program
121480
121532
  */
121481
- function getProgramBuildInfo(state, getCanonicalFileName, host) {
121533
+ function getProgramBuildInfo(state, getCanonicalFileName) {
121482
121534
  var outFilePath = ts.outFile(state.compilerOptions);
121483
121535
  if (outFilePath && !state.compilerOptions.composite)
121484
121536
  return;
121485
121537
  var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory();
121486
121538
  var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
121487
- // Update the dtsChange time in buildInfo
121488
- state.dtsChangeTime = state.hasChangedEmitSignature ? ts.getCurrentTime(host).getTime() : state.dtsChangeTime;
121539
+ // Convert the file name to Path here if we set the fileName instead to optimize multiple d.ts file emits and having to compute Canonical path
121540
+ var latestChangedDtsFile = state.latestChangedDtsFile ? relativeToBuildInfoEnsuringAbsolutePath(state.latestChangedDtsFile) : undefined;
121489
121541
  if (outFilePath) {
121490
121542
  var fileNames_1 = [];
121491
121543
  var fileInfos_1 = [];
@@ -121501,7 +121553,7 @@ var ts;
121501
121553
  fileInfos: fileInfos_1,
121502
121554
  options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, "affectsBundleEmitBuildInfo"),
121503
121555
  outSignature: state.outSignature,
121504
- dtsChangeTime: state.dtsChangeTime,
121556
+ latestChangedDtsFile: latestChangedDtsFile,
121505
121557
  };
121506
121558
  return result_15;
121507
121559
  }
@@ -121603,7 +121655,7 @@ var ts;
121603
121655
  affectedFilesPendingEmit: affectedFilesPendingEmit,
121604
121656
  changeFileSet: changeFileSet,
121605
121657
  emitSignatures: emitSignatures,
121606
- dtsChangeTime: state.dtsChangeTime,
121658
+ latestChangedDtsFile: latestChangedDtsFile,
121607
121659
  };
121608
121660
  return result;
121609
121661
  function relativeToBuildInfoEnsuringAbsolutePath(path) {
@@ -121771,7 +121823,7 @@ var ts;
121771
121823
  */
121772
121824
  var computeHash = ts.maybeBind(host, host.createHash);
121773
121825
  var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
121774
- newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName, host); };
121826
+ newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); };
121775
121827
  // To ensure that we arent storing any references to old program or new program without state
121776
121828
  newProgram = undefined; // TODO: GH#18217
121777
121829
  oldProgram = undefined;
@@ -121781,6 +121833,7 @@ var ts;
121781
121833
  builderProgram.getState = getState;
121782
121834
  builderProgram.saveEmitState = function () { return backupBuilderProgramEmitState(state); };
121783
121835
  builderProgram.restoreEmitState = function (saved) { return restoreBuilderProgramEmitState(state, saved); };
121836
+ builderProgram.hasChangedEmitSignature = function () { return !!state.hasChangedEmitSignature; };
121784
121837
  builderProgram.getAllDependencies = function (sourceFile) { return ts.BuilderState.getAllDependencies(state, ts.Debug.checkDefined(state.program), sourceFile); };
121785
121838
  builderProgram.getSemanticDiagnostics = getSemanticDiagnostics;
121786
121839
  builderProgram.emit = emit;
@@ -121888,18 +121941,22 @@ var ts;
121888
121941
  var filePath = sourceFiles[0].resolvedPath;
121889
121942
  var oldSignature = (_f = state.emitSignatures) === null || _f === void 0 ? void 0 : _f.get(filePath);
121890
121943
  emitSignature !== null && emitSignature !== void 0 ? emitSignature : (emitSignature = computeSignature(text, computeHash, data));
121891
- if (emitSignature !== oldSignature) {
121892
- ((_g = state.emitSignatures) !== null && _g !== void 0 ? _g : (state.emitSignatures = new ts.Map())).set(filePath, emitSignature);
121893
- state.hasChangedEmitSignature = true;
121894
- }
121944
+ // Dont write dts files if they didn't change
121945
+ if (emitSignature === oldSignature)
121946
+ return;
121947
+ ((_g = state.emitSignatures) !== null && _g !== void 0 ? _g : (state.emitSignatures = new ts.Map())).set(filePath, emitSignature);
121948
+ state.hasChangedEmitSignature = true;
121949
+ state.latestChangedDtsFile = fileName;
121895
121950
  }
121896
121951
  }
121897
121952
  else if (state.compilerOptions.composite) {
121898
121953
  var newSignature = computeSignature(text, computeHash, data);
121899
- if (newSignature !== state.outSignature) {
121900
- state.outSignature = newSignature;
121901
- state.hasChangedEmitSignature = true;
121902
- }
121954
+ // Dont write dts files if they didn't change
121955
+ if (newSignature === state.outSignature)
121956
+ return;
121957
+ state.outSignature = newSignature;
121958
+ state.hasChangedEmitSignature = true;
121959
+ state.latestChangedDtsFile = fileName;
121903
121960
  }
121904
121961
  }
121905
121962
  if (writeFile)
@@ -122062,11 +122119,12 @@ var ts;
122062
122119
  var state;
122063
122120
  var filePaths;
122064
122121
  var filePathsSetList;
122122
+ var latestChangedDtsFile = program.latestChangedDtsFile ? toAbsolutePath(program.latestChangedDtsFile) : undefined;
122065
122123
  if (isProgramBundleEmitBuildInfo(program)) {
122066
122124
  state = {
122067
122125
  fileInfos: new ts.Map(),
122068
122126
  compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
122069
- dtsChangeTime: program.dtsChangeTime,
122127
+ latestChangedDtsFile: latestChangedDtsFile,
122070
122128
  outSignature: program.outSignature,
122071
122129
  };
122072
122130
  }
@@ -122099,7 +122157,7 @@ var ts;
122099
122157
  affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
122100
122158
  affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
122101
122159
  changedFilesSet: new ts.Set(ts.map(program.changeFileSet, toFilePath)),
122102
- dtsChangeTime: program.dtsChangeTime,
122160
+ latestChangedDtsFile: latestChangedDtsFile,
122103
122161
  emitSignatures: (emitSignatures_1 === null || emitSignatures_1 === void 0 ? void 0 : emitSignatures_1.size) ? emitSignatures_1 : undefined,
122104
122162
  };
122105
122163
  }
@@ -122126,6 +122184,7 @@ var ts;
122126
122184
  getSemanticDiagnosticsOfNextAffectedFile: ts.notImplemented,
122127
122185
  emitBuildInfo: ts.notImplemented,
122128
122186
  close: ts.noop,
122187
+ hasChangedEmitSignature: ts.returnFalse,
122129
122188
  };
122130
122189
  function toPath(path) {
122131
122190
  return ts.toPath(path, buildInfoDirectory, getCanonicalFileName);
@@ -123440,7 +123499,7 @@ var ts;
123440
123499
  });
123441
123500
  // Sort by paths closest to importing file Name directory
123442
123501
  var sortedPaths = [];
123443
- var _loop_34 = function (directory) {
123502
+ var _loop_35 = function (directory) {
123444
123503
  var directoryStart = ts.ensureTrailingDirectorySeparator(directory);
123445
123504
  var pathsInDirectory;
123446
123505
  allFileNames.forEach(function (_a, fileName) {
@@ -123464,7 +123523,7 @@ var ts;
123464
123523
  };
123465
123524
  var out_directory_1;
123466
123525
  for (var directory = ts.getDirectoryPath(importingFileName); allFileNames.size !== 0;) {
123467
- var state_11 = _loop_34(directory);
123526
+ var state_11 = _loop_35(directory);
123468
123527
  directory = out_directory_1;
123469
123528
  if (state_11 === "break")
123470
123529
  break;
@@ -124308,7 +124367,6 @@ var ts;
124308
124367
  readDirectory: ts.maybeBind(host, host.readDirectory),
124309
124368
  disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
124310
124369
  storeFilesChangingSignatureDuringEmit: host.storeFilesChangingSignatureDuringEmit,
124311
- now: ts.maybeBind(host, host.now),
124312
124370
  };
124313
124371
  function writeFile(fileName, text, writeByteOrderMark, onError) {
124314
124372
  try {
@@ -124466,7 +124524,6 @@ var ts;
124466
124524
  host.createHash = ts.maybeBind(system, system.createHash);
124467
124525
  host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
124468
124526
  host.storeFilesChangingSignatureDuringEmit = system.storeFilesChangingSignatureDuringEmit;
124469
- host.now = ts.maybeBind(system, system.now);
124470
124527
  ts.setGetSourceFileAsHashVersioned(host, system);
124471
124528
  ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
124472
124529
  return host;
@@ -125794,8 +125851,7 @@ var ts;
125794
125851
  }
125795
125852
  // Actual Emit
125796
125853
  var host = state.host, compilerHost = state.compilerHost;
125797
- var resultFlags = BuildResultFlags.DeclarationOutputUnchanged;
125798
- var existingBuildInfo = ((_d = state.buildInfoCache.get(projectPath)) === null || _d === void 0 ? void 0 : _d.buildInfo) || undefined;
125854
+ var resultFlags = ((_d = program.hasChangedEmitSignature) === null || _d === void 0 ? void 0 : _d.call(program)) ? BuildResultFlags.None : BuildResultFlags.DeclarationOutputUnchanged;
125799
125855
  var emitterDiagnostics = ts.createDiagnosticCollection();
125800
125856
  var emittedOutputs = new ts.Map();
125801
125857
  var options = program.getCompilerOptions();
@@ -125803,17 +125859,11 @@ var ts;
125803
125859
  var outputTimeStampMap;
125804
125860
  var now;
125805
125861
  outputFiles.forEach(function (_a) {
125806
- var _b, _c;
125807
125862
  var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
125808
125863
  var path = toPath(state, name);
125809
125864
  emittedOutputs.set(toPath(state, name), name);
125810
- if (buildInfo) {
125811
- setBuildInfo(state, buildInfo, projectPath, options);
125812
- // Buildinfo has information on when last dts change time
125813
- if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo === null || existingBuildInfo === void 0 ? void 0 : existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
125814
- resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
125815
- }
125816
- }
125865
+ if (buildInfo)
125866
+ setBuildInfo(state, buildInfo, projectPath, options, resultFlags);
125817
125867
  ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
125818
125868
  if (!isIncremental && state.watch) {
125819
125869
  (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path, now || (now = getCurrentTime(state.host)));
@@ -125827,7 +125877,7 @@ var ts;
125827
125877
  ts.Debug.assert(step === BuildStep.EmitBuildInfo);
125828
125878
  var emitResult = program.emitBuildInfo(function (name, text, writeByteOrderMark, onError, sourceFiles, data) {
125829
125879
  if (data === null || data === void 0 ? void 0 : data.buildInfo)
125830
- setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions());
125880
+ setBuildInfo(state, data.buildInfo, projectPath, program.getCompilerOptions(), BuildResultFlags.DeclarationOutputUnchanged);
125831
125881
  if (writeFileCallback)
125832
125882
  writeFileCallback(name, text, writeByteOrderMark, onError, sourceFiles, data);
125833
125883
  else
@@ -125860,7 +125910,6 @@ var ts;
125860
125910
  state.diagnostics.delete(projectPath);
125861
125911
  state.projectStatus.set(projectPath, {
125862
125912
  type: ts.UpToDateStatusType.UpToDate,
125863
- newestDeclarationFileContentChangedTime: getDtsChangeTime(state, config.options, projectPath),
125864
125913
  oldestOutputFileName: oldestOutputFileName
125865
125914
  });
125866
125915
  afterProgramDone(state, program, config);
@@ -125902,10 +125951,10 @@ var ts;
125902
125951
  var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark, buildInfo = _a.buildInfo;
125903
125952
  emittedOutputs.set(toPath(state, name), name);
125904
125953
  if (buildInfo) {
125905
- setBuildInfo(state, buildInfo, projectPath, config.options);
125906
- if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.dtsChangeTime) !== ((_c = existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime)) {
125954
+ if (((_b = buildInfo.program) === null || _b === void 0 ? void 0 : _b.outSignature) !== ((_c = existingBuildInfo.program) === null || _c === void 0 ? void 0 : _c.outSignature)) {
125907
125955
  resultFlags &= ~BuildResultFlags.DeclarationOutputUnchanged;
125908
125956
  }
125957
+ setBuildInfo(state, buildInfo, projectPath, config.options, resultFlags);
125909
125958
  }
125910
125959
  ts.writeFile(writeFileCallback ? { writeFile: writeFileCallback } : compilerHost, emitterDiagnostics, name, text, writeByteOrderMark);
125911
125960
  });
@@ -126164,15 +126213,23 @@ var ts;
126164
126213
  state.outputTimeStamps.set(resolvedConfigFilePath, result = new ts.Map());
126165
126214
  return result;
126166
126215
  }
126167
- function setBuildInfo(state, buildInfo, resolvedConfigPath, options) {
126216
+ function setBuildInfo(state, buildInfo, resolvedConfigPath, options, resultFlags) {
126168
126217
  var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
126169
126218
  var existing = getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath);
126219
+ var modifiedTime = getCurrentTime(state.host);
126170
126220
  if (existing) {
126171
126221
  existing.buildInfo = buildInfo;
126172
- existing.modifiedTime = getCurrentTime(state.host);
126222
+ existing.modifiedTime = modifiedTime;
126223
+ if (!(resultFlags & BuildResultFlags.DeclarationOutputUnchanged))
126224
+ existing.latestChangedDtsTime = modifiedTime;
126173
126225
  }
126174
126226
  else {
126175
- state.buildInfoCache.set(resolvedConfigPath, { path: toPath(state, buildInfoPath), buildInfo: buildInfo, modifiedTime: getCurrentTime(state.host) });
126227
+ state.buildInfoCache.set(resolvedConfigPath, {
126228
+ path: toPath(state, buildInfoPath),
126229
+ buildInfo: buildInfo,
126230
+ modifiedTime: modifiedTime,
126231
+ latestChangedDtsTime: resultFlags & BuildResultFlags.DeclarationOutputUnchanged ? undefined : modifiedTime,
126232
+ });
126176
126233
  }
126177
126234
  }
126178
126235
  function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
@@ -126204,7 +126261,7 @@ var ts;
126204
126261
  }
126205
126262
  }
126206
126263
  function getUpToDateStatusWorker(state, project, resolvedPath) {
126207
- var _a, _b, _c;
126264
+ var _a, _b;
126208
126265
  // Container if no files are specified in the project
126209
126266
  if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) {
126210
126267
  return {
@@ -126216,8 +126273,8 @@ var ts;
126216
126273
  var force = !!state.options.force;
126217
126274
  if (project.projectReferences) {
126218
126275
  state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.ComputingUpstream });
126219
- for (var _i = 0, _d = project.projectReferences; _i < _d.length; _i++) {
126220
- var ref = _d[_i];
126276
+ for (var _i = 0, _c = project.projectReferences; _i < _c.length; _i++) {
126277
+ var ref = _c[_i];
126221
126278
  var resolvedRef = ts.resolveProjectReferencePath(ref);
126222
126279
  var resolvedRefPath = toResolvedConfigFilePath(state, resolvedRef);
126223
126280
  var resolvedConfig = parseConfigFile(state, resolvedRef, resolvedRefPath);
@@ -126257,7 +126314,6 @@ var ts;
126257
126314
  var buildInfoTime;
126258
126315
  var buildInfoProgram;
126259
126316
  var buildInfoVersionMap;
126260
- var newestDeclarationFileContentChangedTime;
126261
126317
  if (buildInfoPath) {
126262
126318
  var buildInfoCacheEntry_1 = getBuildInfoCacheEntry(state, buildInfoPath, resolvedPath);
126263
126319
  buildInfoTime = (buildInfoCacheEntry_1 === null || buildInfoCacheEntry_1 === void 0 ? void 0 : buildInfoCacheEntry_1.modifiedTime) || ts.getModifiedTime(host, buildInfoPath);
@@ -126294,8 +126350,6 @@ var ts;
126294
126350
  }
126295
126351
  oldestOutputFileTime = buildInfoTime;
126296
126352
  oldestOutputFileName = buildInfoPath;
126297
- // Get the last dtsChange time from build info
126298
- newestDeclarationFileContentChangedTime = ((_c = buildInfo.program) === null || _c === void 0 ? void 0 : _c.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
126299
126353
  }
126300
126354
  // Check input files
126301
126355
  var newestInputFileName = undefined;
@@ -126303,8 +126357,8 @@ var ts;
126303
126357
  /** True if input file has changed timestamp but text is not changed, we can then do only timestamp updates on output to make it look up-to-date later */
126304
126358
  var pseudoInputUpToDate = false;
126305
126359
  // Get timestamps of input files
126306
- for (var _e = 0, _f = project.fileNames; _e < _f.length; _e++) {
126307
- var inputFile = _f[_e];
126360
+ for (var _d = 0, _e = project.fileNames; _d < _e.length; _d++) {
126361
+ var inputFile = _e[_d];
126308
126362
  var inputTime = getModifiedTime(state, inputFile);
126309
126363
  if (inputTime === ts.missingFileModifiedTime) {
126310
126364
  return {
@@ -126345,8 +126399,8 @@ var ts;
126345
126399
  // Collect the expected outputs of this project
126346
126400
  var outputs = ts.getAllProjectOutputs(project, !host.useCaseSensitiveFileNames());
126347
126401
  var outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath);
126348
- for (var _g = 0, outputs_1 = outputs; _g < outputs_1.length; _g++) {
126349
- var output = outputs_1[_g];
126402
+ for (var _f = 0, outputs_1 = outputs; _f < outputs_1.length; _f++) {
126403
+ var output = outputs_1[_f];
126350
126404
  var path = toPath(state, output);
126351
126405
  // Output is missing; can stop checking
126352
126406
  var outputTime = outputTimeStampMap === null || outputTimeStampMap === void 0 ? void 0 : outputTimeStampMap.get(path);
@@ -126384,8 +126438,8 @@ var ts;
126384
126438
  var usesPrepend = false;
126385
126439
  var upstreamChangedProject;
126386
126440
  if (referenceStatuses) {
126387
- for (var _h = 0, referenceStatuses_1 = referenceStatuses; _h < referenceStatuses_1.length; _h++) {
126388
- var _j = referenceStatuses_1[_h], ref = _j.ref, refStatus = _j.refStatus, resolvedConfig = _j.resolvedConfig, resolvedRefPath = _j.resolvedRefPath;
126441
+ for (var _g = 0, referenceStatuses_1 = referenceStatuses; _g < referenceStatuses_1.length; _g++) {
126442
+ var _h = referenceStatuses_1[_g], ref = _h.ref, refStatus = _h.refStatus, resolvedConfig = _h.resolvedConfig, resolvedRefPath = _h.resolvedRefPath;
126389
126443
  usesPrepend = usesPrepend || !!(ref.prepend);
126390
126444
  // If the upstream project's newest file is older than our oldest output, we
126391
126445
  // can't be out of date because of it
@@ -126402,7 +126456,8 @@ var ts;
126402
126456
  }
126403
126457
  // If the upstream project has only change .d.ts files, and we've built
126404
126458
  // *after* those files, then we're "psuedo up to date" and eligible for a fast rebuild
126405
- if (refStatus.newestDeclarationFileContentChangedTime && refStatus.newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
126459
+ var newestDeclarationFileContentChangedTime = getLatestChangedDtsTime(state, resolvedConfig.options, resolvedRefPath);
126460
+ if (newestDeclarationFileContentChangedTime && newestDeclarationFileContentChangedTime <= oldestOutputFileTime) {
126406
126461
  pseudoUpToDate = true;
126407
126462
  upstreamChangedProject = ref.path;
126408
126463
  continue;
@@ -126445,7 +126500,6 @@ var ts;
126445
126500
  pseudoInputUpToDate ?
126446
126501
  ts.UpToDateStatusType.UpToDateWithInputFileText :
126447
126502
  ts.UpToDateStatusType.UpToDate,
126448
- newestDeclarationFileContentChangedTime: newestDeclarationFileContentChangedTime,
126449
126503
  newestInputFileTime: newestInputFileTime,
126450
126504
  newestInputFileName: newestInputFileName,
126451
126505
  oldestOutputFileName: oldestOutputFileName
@@ -126529,13 +126583,17 @@ var ts;
126529
126583
  outputTimeStampMap.delete(key);
126530
126584
  });
126531
126585
  }
126532
- function getDtsChangeTime(state, options, resolvedConfigPath) {
126533
- var _a;
126586
+ function getLatestChangedDtsTime(state, options, resolvedConfigPath) {
126534
126587
  if (!options.composite)
126535
126588
  return undefined;
126536
- var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(options);
126537
- var buildInfo = getBuildInfo(state, buildInfoPath, resolvedConfigPath, /*modifiedTime*/ undefined);
126538
- return ((_a = buildInfo === null || buildInfo === void 0 ? void 0 : buildInfo.program) === null || _a === void 0 ? void 0 : _a.dtsChangeTime) ? new Date(buildInfo.program.dtsChangeTime) : undefined;
126589
+ var entry = ts.Debug.checkDefined(state.buildInfoCache.get(resolvedConfigPath));
126590
+ if (entry.latestChangedDtsTime !== undefined)
126591
+ return entry.latestChangedDtsTime || undefined;
126592
+ var latestChangedDtsTime = entry.buildInfo && entry.buildInfo.program && entry.buildInfo.program.latestChangedDtsFile ?
126593
+ state.host.getModifiedTime(ts.getNormalizedAbsolutePath(entry.buildInfo.program.latestChangedDtsFile, ts.getDirectoryPath(entry.path))) :
126594
+ undefined;
126595
+ entry.latestChangedDtsTime = latestChangedDtsTime || false;
126596
+ return latestChangedDtsTime;
126539
126597
  }
126540
126598
  function updateOutputTimestamps(state, proj, resolvedPath) {
126541
126599
  if (state.options.dry) {
@@ -126544,7 +126602,6 @@ var ts;
126544
126602
  updateOutputTimestampsWorker(state, proj, resolvedPath, ts.Diagnostics.Updating_output_timestamps_of_project_0);
126545
126603
  state.projectStatus.set(resolvedPath, {
126546
126604
  type: ts.UpToDateStatusType.UpToDate,
126547
- newestDeclarationFileContentChangedTime: getDtsChangeTime(state, proj.options, resolvedPath),
126548
126605
  oldestOutputFileName: ts.getFirstProjectOutput(proj, !state.host.useCaseSensitiveFileNames())
126549
126606
  });
126550
126607
  }