@typescript-deploys/pr-build 5.5.0-pr-58337-4 → 5.5.0-pr-58337-27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/tsc.js CHANGED
@@ -18,7 +18,7 @@ and limitations under the License.
18
18
 
19
19
  // src/compiler/corePublic.ts
20
20
  var versionMajorMinor = "5.5";
21
- var version = `${versionMajorMinor}.0-insiders.20240426`;
21
+ var version = `${versionMajorMinor}.0-insiders.20240427`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -447,13 +447,23 @@ function deduplicateSorted(array, comparer) {
447
447
  }
448
448
  return deduplicated;
449
449
  }
450
- function insertSorted(array, insert, compare, allowDuplicates) {
450
+ function insertSorted(array, insert, compare, equalityComparer, allowDuplicates) {
451
451
  if (array.length === 0) {
452
452
  array.push(insert);
453
453
  return true;
454
454
  }
455
455
  const insertIndex = binarySearch(array, insert, identity, compare);
456
456
  if (insertIndex < 0) {
457
+ if (equalityComparer && !allowDuplicates) {
458
+ const idx = ~insertIndex;
459
+ if (idx > 0 && equalityComparer(insert, array[idx - 1])) {
460
+ return false;
461
+ }
462
+ if (idx < array.length && equalityComparer(insert, array[idx])) {
463
+ array.splice(idx, 1, insert);
464
+ return true;
465
+ }
466
+ }
457
467
  array.splice(~insertIndex, 0, insert);
458
468
  return true;
459
469
  }
@@ -11073,7 +11083,7 @@ function isExternalModuleNameRelative(moduleName) {
11073
11083
  return pathIsRelative(moduleName) || isRootedDiskPath(moduleName);
11074
11084
  }
11075
11085
  function sortAndDeduplicateDiagnostics(diagnostics) {
11076
- return sortAndDeduplicate(diagnostics, compareDiagnostics);
11086
+ return sortAndDeduplicate(diagnostics, compareDiagnostics, diagnosticsEqualityComparer);
11077
11087
  }
11078
11088
  function getDefaultLibFileName(options) {
11079
11089
  switch (getEmitScriptTarget(options)) {
@@ -15750,6 +15760,9 @@ function createDiagnosticCollection() {
15750
15760
  if (result >= 0) {
15751
15761
  return diagnostics[result];
15752
15762
  }
15763
+ if (~result > 0 && diagnosticsEqualityComparer(diagnostic, diagnostics[~result - 1])) {
15764
+ return diagnostics[~result - 1];
15765
+ }
15753
15766
  return void 0;
15754
15767
  }
15755
15768
  function add(diagnostic) {
@@ -15768,7 +15781,7 @@ function createDiagnosticCollection() {
15768
15781
  }
15769
15782
  diagnostics = nonFileDiagnostics;
15770
15783
  }
15771
- insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation);
15784
+ insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation, diagnosticsEqualityComparer);
15772
15785
  }
15773
15786
  function getGlobalDiagnostics() {
15774
15787
  hasReadNonFileDiagnostics = true;
@@ -17374,7 +17387,7 @@ function compareRelatedInformation(d1, d2) {
17374
17387
  return 0 /* EqualTo */;
17375
17388
  }
17376
17389
  if (d1.relatedInformation && d2.relatedInformation) {
17377
- return compareValues(d1.relatedInformation.length, d2.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index) => {
17390
+ return compareValues(d2.relatedInformation.length, d1.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index) => {
17378
17391
  const d2i = d2.relatedInformation[index];
17379
17392
  return compareDiagnostics(d1i, d2i);
17380
17393
  }) || 0 /* EqualTo */;
@@ -17384,38 +17397,78 @@ function compareRelatedInformation(d1, d2) {
17384
17397
  function compareMessageText(t1, t2) {
17385
17398
  if (typeof t1 === "string" && typeof t2 === "string") {
17386
17399
  return compareStringsCaseSensitive(t1, t2);
17387
- } else if (typeof t1 === "string") {
17388
- return -1 /* LessThan */;
17389
- } else if (typeof t2 === "string") {
17390
- return 1 /* GreaterThan */;
17391
17400
  }
17392
- let res = compareStringsCaseSensitive(t1.messageText, t2.messageText);
17401
+ if (typeof t1 === "string") {
17402
+ t1 = { messageText: t1 };
17403
+ }
17404
+ if (typeof t2 === "string") {
17405
+ t2 = { messageText: t2 };
17406
+ }
17407
+ const res = compareStringsCaseSensitive(t1.messageText, t2.messageText);
17393
17408
  if (res) {
17394
17409
  return res;
17395
17410
  }
17396
- if (!t1.next && !t2.next) {
17411
+ return compareMessageChain(t1.next, t2.next);
17412
+ }
17413
+ function compareMessageChain(c1, c2) {
17414
+ if (c1 === void 0 && c2 === void 0) {
17397
17415
  return 0 /* EqualTo */;
17398
17416
  }
17399
- if (!t1.next) {
17417
+ if (c1 === void 0) {
17418
+ return 1 /* GreaterThan */;
17419
+ }
17420
+ if (c2 === void 0) {
17400
17421
  return -1 /* LessThan */;
17401
17422
  }
17402
- if (!t2.next) {
17423
+ return compareMessageChainSize(c1, c2) || compareMessageChainContent(c1, c2);
17424
+ }
17425
+ function compareMessageChainSize(c1, c2) {
17426
+ if (c1 === void 0 && c2 === void 0) {
17427
+ return 0 /* EqualTo */;
17428
+ }
17429
+ if (c1 === void 0) {
17403
17430
  return 1 /* GreaterThan */;
17404
17431
  }
17405
- const len = Math.min(t1.next.length, t2.next.length);
17406
- for (let i = 0; i < len; i++) {
17407
- res = compareMessageText(t1.next[i], t2.next[i]);
17432
+ if (c2 === void 0) {
17433
+ return -1 /* LessThan */;
17434
+ }
17435
+ let res = compareValues(c2.length, c1.length);
17436
+ if (res) {
17437
+ return res;
17438
+ }
17439
+ for (let i = 0; i < c2.length; i++) {
17440
+ res = compareMessageChainSize(c1[i].next, c2[i].next);
17408
17441
  if (res) {
17409
17442
  return res;
17410
17443
  }
17411
17444
  }
17412
- if (t1.next.length < t2.next.length) {
17413
- return -1 /* LessThan */;
17414
- } else if (t1.next.length > t2.next.length) {
17415
- return 1 /* GreaterThan */;
17445
+ return 0 /* EqualTo */;
17446
+ }
17447
+ function compareMessageChainContent(c1, c2) {
17448
+ let res;
17449
+ for (let i = 0; i < c2.length; i++) {
17450
+ res = compareStringsCaseSensitive(c1[i].messageText, c2[i].messageText);
17451
+ if (res) {
17452
+ return res;
17453
+ }
17454
+ if (c1[i].next === void 0) {
17455
+ continue;
17456
+ }
17457
+ res = compareMessageChainContent(c1[i].next, c2[i].next);
17458
+ if (res) {
17459
+ return res;
17460
+ }
17416
17461
  }
17417
17462
  return 0 /* EqualTo */;
17418
17463
  }
17464
+ function diagnosticsEqualityComparer(d1, d2) {
17465
+ return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) === 0 /* EqualTo */ && compareValues(d1.start, d2.start) === 0 /* EqualTo */ && compareValues(d1.length, d2.length) === 0 /* EqualTo */ && compareValues(d1.code, d2.code) === 0 /* EqualTo */ && messageTextEqualityComparer(d1.messageText, d2.messageText);
17466
+ }
17467
+ function messageTextEqualityComparer(m1, m2) {
17468
+ const t1 = typeof m1 === "string" ? m1 : m1.messageText;
17469
+ const t2 = typeof m2 === "string" ? m2 : m2.messageText;
17470
+ return compareStringsCaseSensitive(t1, t2) === 0 /* EqualTo */;
17471
+ }
17419
17472
  function getLanguageVariant(scriptKind) {
17420
17473
  return scriptKind === 4 /* TSX */ || scriptKind === 2 /* JSX */ || scriptKind === 1 /* JS */ || scriptKind === 6 /* JSON */ ? 1 /* JSX */ : 0 /* Standard */;
17421
17474
  }
@@ -54721,7 +54774,7 @@ function createTypeChecker(host) {
54721
54774
  }
54722
54775
  type = anyType;
54723
54776
  }
54724
- links.type = type;
54777
+ links.type ?? (links.type = type);
54725
54778
  }
54726
54779
  return links.type;
54727
54780
  }
@@ -54739,7 +54792,7 @@ function createTypeChecker(host) {
54739
54792
  }
54740
54793
  writeType = anyType;
54741
54794
  }
54742
- links.writeType = writeType || getTypeOfAccessors(symbol);
54795
+ links.writeType ?? (links.writeType = writeType || getTypeOfAccessors(symbol));
54743
54796
  }
54744
54797
  return links.writeType;
54745
54798
  }
@@ -54816,10 +54869,10 @@ function createTypeChecker(host) {
54816
54869
  true
54817
54870
  );
54818
54871
  const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
54819
- links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType;
54872
+ links.type ?? (links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType);
54820
54873
  if (!popTypeResolution()) {
54821
54874
  reportCircularityError(exportSymbol ?? symbol);
54822
- return links.type = errorType;
54875
+ return links.type ?? (links.type = errorType);
54823
54876
  }
54824
54877
  }
54825
54878
  return links.type;
@@ -55085,7 +55138,7 @@ function createTypeChecker(host) {
55085
55138
  }
55086
55139
  if (!popTypeResolution()) {
55087
55140
  error(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol));
55088
- return type.resolvedBaseConstructorType = errorType;
55141
+ return type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = errorType);
55089
55142
  }
55090
55143
  if (!(baseConstructorType.flags & 1 /* Any */) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
55091
55144
  const err = error(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType));
@@ -55102,9 +55155,9 @@ function createTypeChecker(host) {
55102
55155
  addRelatedInfo(err, createDiagnosticForNode(baseConstructorType.symbol.declarations[0], Diagnostics.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1, symbolToString(baseConstructorType.symbol), typeToString(ctorReturn)));
55103
55156
  }
55104
55157
  }
55105
- return type.resolvedBaseConstructorType = errorType;
55158
+ return type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = errorType);
55106
55159
  }
55107
- type.resolvedBaseConstructorType = baseConstructorType;
55160
+ type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = baseConstructorType);
55108
55161
  }
55109
55162
  return type.resolvedBaseConstructorType;
55110
55163
  }
@@ -55345,7 +55398,7 @@ function createTypeChecker(host) {
55345
55398
  error(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));
55346
55399
  }
55347
55400
  }
55348
- links.declaredType = type;
55401
+ links.declaredType ?? (links.declaredType = type);
55349
55402
  }
55350
55403
  return links.declaredType;
55351
55404
  }
@@ -56463,6 +56516,7 @@ function createTypeChecker(host) {
56463
56516
  }
56464
56517
  }
56465
56518
  function getTypeOfMappedSymbol(symbol) {
56519
+ var _a;
56466
56520
  if (!symbol.links.type) {
56467
56521
  const mappedType = symbol.links.mappedType;
56468
56522
  if (!pushTypeResolution(symbol, 0 /* Type */)) {
@@ -56481,7 +56535,7 @@ function createTypeChecker(host) {
56481
56535
  error(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType));
56482
56536
  type = errorType;
56483
56537
  }
56484
- symbol.links.type = type;
56538
+ (_a = symbol.links).type ?? (_a.type = type);
56485
56539
  }
56486
56540
  return symbol.links.type;
56487
56541
  }
@@ -56834,7 +56888,7 @@ function createTypeChecker(host) {
56834
56888
  }
56835
56889
  result = circularConstraintType;
56836
56890
  }
56837
- t.immediateBaseConstraint = result || noConstraintType;
56891
+ t.immediateBaseConstraint ?? (t.immediateBaseConstraint = result || noConstraintType);
56838
56892
  }
56839
56893
  return t.immediateBaseConstraint;
56840
56894
  }
@@ -57708,7 +57762,7 @@ function createTypeChecker(host) {
57708
57762
  }
57709
57763
  type = anyType;
57710
57764
  }
57711
- signature.resolvedReturnType = type;
57765
+ signature.resolvedReturnType ?? (signature.resolvedReturnType = type);
57712
57766
  }
57713
57767
  return signature.resolvedReturnType;
57714
57768
  }
@@ -58054,9 +58108,9 @@ function createTypeChecker(host) {
58054
58108
  const node = type.node;
58055
58109
  const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode);
58056
58110
  if (popTypeResolution()) {
58057
- type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments;
58111
+ type.resolvedTypeArguments ?? (type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments);
58058
58112
  } else {
58059
- type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray;
58113
+ type.resolvedTypeArguments ?? (type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray);
58060
58114
  error(
58061
58115
  type.node || currentNode,
58062
58116
  type.target.symbol ? Diagnostics.Type_arguments_for_0_circularly_reference_themselves : Diagnostics.Tuple_type_arguments_circularly_reference_themselves,
@@ -69330,7 +69384,7 @@ function createTypeChecker(host) {
69330
69384
  reportCircularityError(declaration.symbol);
69331
69385
  return true;
69332
69386
  }
69333
- links.parameterInitializerContainsUndefined = containsUndefined;
69387
+ links.parameterInitializerContainsUndefined ?? (links.parameterInitializerContainsUndefined = containsUndefined);
69334
69388
  }
69335
69389
  return links.parameterInitializerContainsUndefined;
69336
69390
  }
@@ -74740,7 +74794,7 @@ function createTypeChecker(host) {
74740
74794
  return cached;
74741
74795
  }
74742
74796
  const saveResolutionStart = resolutionStart;
74743
- if (saveResolutionStart === 0) {
74797
+ if (!cached) {
74744
74798
  resolutionStart = resolutionTargets.length;
74745
74799
  }
74746
74800
  links.resolvedSignature = resolvingSignature;
package/lib/typescript.js CHANGED
@@ -511,6 +511,7 @@ __export(typescript_exports, {
511
511
  defaultMaximumTruncationLength: () => defaultMaximumTruncationLength,
512
512
  diagnosticCategoryName: () => diagnosticCategoryName,
513
513
  diagnosticToString: () => diagnosticToString,
514
+ diagnosticsEqualityComparer: () => diagnosticsEqualityComparer,
514
515
  directoryProbablyExists: () => directoryProbablyExists,
515
516
  directorySeparator: () => directorySeparator,
516
517
  displayPart: () => displayPart,
@@ -2360,7 +2361,7 @@ module.exports = __toCommonJS(typescript_exports);
2360
2361
 
2361
2362
  // src/compiler/corePublic.ts
2362
2363
  var versionMajorMinor = "5.5";
2363
- var version = `${versionMajorMinor}.0-insiders.20240426`;
2364
+ var version = `${versionMajorMinor}.0-insiders.20240427`;
2364
2365
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2365
2366
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2366
2367
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -2880,13 +2881,23 @@ function deduplicateSorted(array, comparer) {
2880
2881
  function createSortedArray() {
2881
2882
  return [];
2882
2883
  }
2883
- function insertSorted(array, insert, compare, allowDuplicates) {
2884
+ function insertSorted(array, insert, compare, equalityComparer, allowDuplicates) {
2884
2885
  if (array.length === 0) {
2885
2886
  array.push(insert);
2886
2887
  return true;
2887
2888
  }
2888
2889
  const insertIndex = binarySearch(array, insert, identity, compare);
2889
2890
  if (insertIndex < 0) {
2891
+ if (equalityComparer && !allowDuplicates) {
2892
+ const idx = ~insertIndex;
2893
+ if (idx > 0 && equalityComparer(insert, array[idx - 1])) {
2894
+ return false;
2895
+ }
2896
+ if (idx < array.length && equalityComparer(insert, array[idx])) {
2897
+ array.splice(idx, 1, insert);
2898
+ return true;
2899
+ }
2900
+ }
2890
2901
  array.splice(~insertIndex, 0, insert);
2891
2902
  return true;
2892
2903
  }
@@ -14708,7 +14719,7 @@ function isExternalModuleNameRelative(moduleName) {
14708
14719
  return pathIsRelative(moduleName) || isRootedDiskPath(moduleName);
14709
14720
  }
14710
14721
  function sortAndDeduplicateDiagnostics(diagnostics) {
14711
- return sortAndDeduplicate(diagnostics, compareDiagnostics);
14722
+ return sortAndDeduplicate(diagnostics, compareDiagnostics, diagnosticsEqualityComparer);
14712
14723
  }
14713
14724
  function getDefaultLibFileName(options) {
14714
14725
  switch (getEmitScriptTarget(options)) {
@@ -19832,6 +19843,9 @@ function createDiagnosticCollection() {
19832
19843
  if (result >= 0) {
19833
19844
  return diagnostics[result];
19834
19845
  }
19846
+ if (~result > 0 && diagnosticsEqualityComparer(diagnostic, diagnostics[~result - 1])) {
19847
+ return diagnostics[~result - 1];
19848
+ }
19835
19849
  return void 0;
19836
19850
  }
19837
19851
  function add(diagnostic) {
@@ -19850,7 +19864,7 @@ function createDiagnosticCollection() {
19850
19864
  }
19851
19865
  diagnostics = nonFileDiagnostics;
19852
19866
  }
19853
- insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation);
19867
+ insertSorted(diagnostics, diagnostic, compareDiagnosticsSkipRelatedInformation, diagnosticsEqualityComparer);
19854
19868
  }
19855
19869
  function getGlobalDiagnostics() {
19856
19870
  hasReadNonFileDiagnostics = true;
@@ -21618,7 +21632,7 @@ function compareRelatedInformation(d1, d2) {
21618
21632
  return 0 /* EqualTo */;
21619
21633
  }
21620
21634
  if (d1.relatedInformation && d2.relatedInformation) {
21621
- return compareValues(d1.relatedInformation.length, d2.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index) => {
21635
+ return compareValues(d2.relatedInformation.length, d1.relatedInformation.length) || forEach(d1.relatedInformation, (d1i, index) => {
21622
21636
  const d2i = d2.relatedInformation[index];
21623
21637
  return compareDiagnostics(d1i, d2i);
21624
21638
  }) || 0 /* EqualTo */;
@@ -21628,38 +21642,78 @@ function compareRelatedInformation(d1, d2) {
21628
21642
  function compareMessageText(t1, t2) {
21629
21643
  if (typeof t1 === "string" && typeof t2 === "string") {
21630
21644
  return compareStringsCaseSensitive(t1, t2);
21631
- } else if (typeof t1 === "string") {
21632
- return -1 /* LessThan */;
21633
- } else if (typeof t2 === "string") {
21634
- return 1 /* GreaterThan */;
21635
21645
  }
21636
- let res = compareStringsCaseSensitive(t1.messageText, t2.messageText);
21646
+ if (typeof t1 === "string") {
21647
+ t1 = { messageText: t1 };
21648
+ }
21649
+ if (typeof t2 === "string") {
21650
+ t2 = { messageText: t2 };
21651
+ }
21652
+ const res = compareStringsCaseSensitive(t1.messageText, t2.messageText);
21637
21653
  if (res) {
21638
21654
  return res;
21639
21655
  }
21640
- if (!t1.next && !t2.next) {
21656
+ return compareMessageChain(t1.next, t2.next);
21657
+ }
21658
+ function compareMessageChain(c1, c2) {
21659
+ if (c1 === void 0 && c2 === void 0) {
21641
21660
  return 0 /* EqualTo */;
21642
21661
  }
21643
- if (!t1.next) {
21662
+ if (c1 === void 0) {
21663
+ return 1 /* GreaterThan */;
21664
+ }
21665
+ if (c2 === void 0) {
21644
21666
  return -1 /* LessThan */;
21645
21667
  }
21646
- if (!t2.next) {
21668
+ return compareMessageChainSize(c1, c2) || compareMessageChainContent(c1, c2);
21669
+ }
21670
+ function compareMessageChainSize(c1, c2) {
21671
+ if (c1 === void 0 && c2 === void 0) {
21672
+ return 0 /* EqualTo */;
21673
+ }
21674
+ if (c1 === void 0) {
21647
21675
  return 1 /* GreaterThan */;
21648
21676
  }
21649
- const len = Math.min(t1.next.length, t2.next.length);
21650
- for (let i = 0; i < len; i++) {
21651
- res = compareMessageText(t1.next[i], t2.next[i]);
21677
+ if (c2 === void 0) {
21678
+ return -1 /* LessThan */;
21679
+ }
21680
+ let res = compareValues(c2.length, c1.length);
21681
+ if (res) {
21682
+ return res;
21683
+ }
21684
+ for (let i = 0; i < c2.length; i++) {
21685
+ res = compareMessageChainSize(c1[i].next, c2[i].next);
21652
21686
  if (res) {
21653
21687
  return res;
21654
21688
  }
21655
21689
  }
21656
- if (t1.next.length < t2.next.length) {
21657
- return -1 /* LessThan */;
21658
- } else if (t1.next.length > t2.next.length) {
21659
- return 1 /* GreaterThan */;
21690
+ return 0 /* EqualTo */;
21691
+ }
21692
+ function compareMessageChainContent(c1, c2) {
21693
+ let res;
21694
+ for (let i = 0; i < c2.length; i++) {
21695
+ res = compareStringsCaseSensitive(c1[i].messageText, c2[i].messageText);
21696
+ if (res) {
21697
+ return res;
21698
+ }
21699
+ if (c1[i].next === void 0) {
21700
+ continue;
21701
+ }
21702
+ res = compareMessageChainContent(c1[i].next, c2[i].next);
21703
+ if (res) {
21704
+ return res;
21705
+ }
21660
21706
  }
21661
21707
  return 0 /* EqualTo */;
21662
21708
  }
21709
+ function diagnosticsEqualityComparer(d1, d2) {
21710
+ return compareStringsCaseSensitive(getDiagnosticFilePath(d1), getDiagnosticFilePath(d2)) === 0 /* EqualTo */ && compareValues(d1.start, d2.start) === 0 /* EqualTo */ && compareValues(d1.length, d2.length) === 0 /* EqualTo */ && compareValues(d1.code, d2.code) === 0 /* EqualTo */ && messageTextEqualityComparer(d1.messageText, d2.messageText);
21711
+ }
21712
+ function messageTextEqualityComparer(m1, m2) {
21713
+ const t1 = typeof m1 === "string" ? m1 : m1.messageText;
21714
+ const t2 = typeof m2 === "string" ? m2 : m2.messageText;
21715
+ return compareStringsCaseSensitive(t1, t2) === 0 /* EqualTo */;
21716
+ }
21663
21717
  function getLanguageVariant(scriptKind) {
21664
21718
  return scriptKind === 4 /* TSX */ || scriptKind === 2 /* JSX */ || scriptKind === 1 /* JS */ || scriptKind === 6 /* JSON */ ? 1 /* JSX */ : 0 /* Standard */;
21665
21719
  }
@@ -59550,7 +59604,7 @@ function createTypeChecker(host) {
59550
59604
  }
59551
59605
  type = anyType;
59552
59606
  }
59553
- links.type = type;
59607
+ links.type ?? (links.type = type);
59554
59608
  }
59555
59609
  return links.type;
59556
59610
  }
@@ -59568,7 +59622,7 @@ function createTypeChecker(host) {
59568
59622
  }
59569
59623
  writeType = anyType;
59570
59624
  }
59571
- links.writeType = writeType || getTypeOfAccessors(symbol);
59625
+ links.writeType ?? (links.writeType = writeType || getTypeOfAccessors(symbol));
59572
59626
  }
59573
59627
  return links.writeType;
59574
59628
  }
@@ -59645,10 +59699,10 @@ function createTypeChecker(host) {
59645
59699
  true
59646
59700
  );
59647
59701
  const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
59648
- links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType;
59702
+ links.type ?? (links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType);
59649
59703
  if (!popTypeResolution()) {
59650
59704
  reportCircularityError(exportSymbol ?? symbol);
59651
- return links.type = errorType;
59705
+ return links.type ?? (links.type = errorType);
59652
59706
  }
59653
59707
  }
59654
59708
  return links.type;
@@ -59914,7 +59968,7 @@ function createTypeChecker(host) {
59914
59968
  }
59915
59969
  if (!popTypeResolution()) {
59916
59970
  error2(type.symbol.valueDeclaration, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression, symbolToString(type.symbol));
59917
- return type.resolvedBaseConstructorType = errorType;
59971
+ return type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = errorType);
59918
59972
  }
59919
59973
  if (!(baseConstructorType.flags & 1 /* Any */) && baseConstructorType !== nullWideningType && !isConstructorType(baseConstructorType)) {
59920
59974
  const err = error2(baseTypeNode.expression, Diagnostics.Type_0_is_not_a_constructor_function_type, typeToString(baseConstructorType));
@@ -59931,9 +59985,9 @@ function createTypeChecker(host) {
59931
59985
  addRelatedInfo(err, createDiagnosticForNode(baseConstructorType.symbol.declarations[0], Diagnostics.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1, symbolToString(baseConstructorType.symbol), typeToString(ctorReturn)));
59932
59986
  }
59933
59987
  }
59934
- return type.resolvedBaseConstructorType = errorType;
59988
+ return type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = errorType);
59935
59989
  }
59936
- type.resolvedBaseConstructorType = baseConstructorType;
59990
+ type.resolvedBaseConstructorType ?? (type.resolvedBaseConstructorType = baseConstructorType);
59937
59991
  }
59938
59992
  return type.resolvedBaseConstructorType;
59939
59993
  }
@@ -60174,7 +60228,7 @@ function createTypeChecker(host) {
60174
60228
  error2(isNamedDeclaration(declaration) ? declaration.name || declaration : declaration, Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));
60175
60229
  }
60176
60230
  }
60177
- links.declaredType = type;
60231
+ links.declaredType ?? (links.declaredType = type);
60178
60232
  }
60179
60233
  return links.declaredType;
60180
60234
  }
@@ -61292,6 +61346,7 @@ function createTypeChecker(host) {
61292
61346
  }
61293
61347
  }
61294
61348
  function getTypeOfMappedSymbol(symbol) {
61349
+ var _a;
61295
61350
  if (!symbol.links.type) {
61296
61351
  const mappedType = symbol.links.mappedType;
61297
61352
  if (!pushTypeResolution(symbol, 0 /* Type */)) {
@@ -61310,7 +61365,7 @@ function createTypeChecker(host) {
61310
61365
  error2(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType));
61311
61366
  type = errorType;
61312
61367
  }
61313
- symbol.links.type = type;
61368
+ (_a = symbol.links).type ?? (_a.type = type);
61314
61369
  }
61315
61370
  return symbol.links.type;
61316
61371
  }
@@ -61663,7 +61718,7 @@ function createTypeChecker(host) {
61663
61718
  }
61664
61719
  result = circularConstraintType;
61665
61720
  }
61666
- t.immediateBaseConstraint = result || noConstraintType;
61721
+ t.immediateBaseConstraint ?? (t.immediateBaseConstraint = result || noConstraintType);
61667
61722
  }
61668
61723
  return t.immediateBaseConstraint;
61669
61724
  }
@@ -62537,7 +62592,7 @@ function createTypeChecker(host) {
62537
62592
  }
62538
62593
  type = anyType;
62539
62594
  }
62540
- signature.resolvedReturnType = type;
62595
+ signature.resolvedReturnType ?? (signature.resolvedReturnType = type);
62541
62596
  }
62542
62597
  return signature.resolvedReturnType;
62543
62598
  }
@@ -62883,9 +62938,9 @@ function createTypeChecker(host) {
62883
62938
  const node = type.node;
62884
62939
  const typeArguments = !node ? emptyArray : node.kind === 183 /* TypeReference */ ? concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments2(node, type.target.localTypeParameters)) : node.kind === 188 /* ArrayType */ ? [getTypeFromTypeNode(node.elementType)] : map(node.elements, getTypeFromTypeNode);
62885
62940
  if (popTypeResolution()) {
62886
- type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments;
62941
+ type.resolvedTypeArguments ?? (type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments);
62887
62942
  } else {
62888
- type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray;
62943
+ type.resolvedTypeArguments ?? (type.resolvedTypeArguments = ((_b = type.target.localTypeParameters) == null ? void 0 : _b.map(() => errorType)) || emptyArray);
62889
62944
  error2(
62890
62945
  type.node || currentNode,
62891
62946
  type.target.symbol ? Diagnostics.Type_arguments_for_0_circularly_reference_themselves : Diagnostics.Tuple_type_arguments_circularly_reference_themselves,
@@ -74159,7 +74214,7 @@ function createTypeChecker(host) {
74159
74214
  reportCircularityError(declaration.symbol);
74160
74215
  return true;
74161
74216
  }
74162
- links.parameterInitializerContainsUndefined = containsUndefined;
74217
+ links.parameterInitializerContainsUndefined ?? (links.parameterInitializerContainsUndefined = containsUndefined);
74163
74218
  }
74164
74219
  return links.parameterInitializerContainsUndefined;
74165
74220
  }
@@ -79569,7 +79624,7 @@ function createTypeChecker(host) {
79569
79624
  return cached;
79570
79625
  }
79571
79626
  const saveResolutionStart = resolutionStart;
79572
- if (saveResolutionStart === 0) {
79627
+ if (!cached) {
79573
79628
  resolutionStart = resolutionTargets.length;
79574
79629
  }
79575
79630
  links.resolvedSignature = resolvingSignature;
@@ -162689,6 +162744,8 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log,
162689
162744
  entries,
162690
162745
  keywordEntry,
162691
162746
  compareCompletionEntries,
162747
+ /*equalityComparer*/
162748
+ void 0,
162692
162749
  /*allowDuplicates*/
162693
162750
  true
162694
162751
  );
@@ -162702,6 +162759,8 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log,
162702
162759
  entries,
162703
162760
  keywordEntry,
162704
162761
  compareCompletionEntries,
162762
+ /*equalityComparer*/
162763
+ void 0,
162705
162764
  /*allowDuplicates*/
162706
162765
  true
162707
162766
  );
@@ -162714,6 +162773,8 @@ function completionInfoFromData(sourceFile, host, program, compilerOptions, log,
162714
162773
  entries,
162715
162774
  literalEntry,
162716
162775
  compareCompletionEntries,
162776
+ /*equalityComparer*/
162777
+ void 0,
162717
162778
  /*allowDuplicates*/
162718
162779
  true
162719
162780
  );
@@ -163636,6 +163697,8 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con
163636
163697
  entries,
163637
163698
  entry,
163638
163699
  compareCompletionEntries,
163700
+ /*equalityComparer*/
163701
+ void 0,
163639
163702
  /*allowDuplicates*/
163640
163703
  true
163641
163704
  );
@@ -178233,6 +178296,7 @@ __export(ts_exports2, {
178233
178296
  defaultMaximumTruncationLength: () => defaultMaximumTruncationLength,
178234
178297
  diagnosticCategoryName: () => diagnosticCategoryName,
178235
178298
  diagnosticToString: () => diagnosticToString,
178299
+ diagnosticsEqualityComparer: () => diagnosticsEqualityComparer,
178236
178300
  directoryProbablyExists: () => directoryProbablyExists,
178237
178301
  directorySeparator: () => directorySeparator,
178238
178302
  displayPart: () => displayPart,
@@ -192659,6 +192723,7 @@ if (typeof console !== "undefined") {
192659
192723
  defaultMaximumTruncationLength,
192660
192724
  diagnosticCategoryName,
192661
192725
  diagnosticToString,
192726
+ diagnosticsEqualityComparer,
192662
192727
  directoryProbablyExists,
192663
192728
  directorySeparator,
192664
192729
  displayPart,
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": "5.5.0-pr-58337-4",
5
+ "version": "5.5.0-pr-58337-27",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [