@typescript-deploys/pr-build 5.2.0-pr-55224-9 → 5.2.0-pr-54188-13

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.2";
21
- var version = `${versionMajorMinor}.0-insiders.20230801`;
21
+ var version = `${versionMajorMinor}.0-insiders.20230802`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -1302,36 +1302,6 @@ function trimEndImpl(s) {
1302
1302
  function isNodeLikeSystem() {
1303
1303
  return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object";
1304
1304
  }
1305
- function createStackSet() {
1306
- const refs = /* @__PURE__ */ new Map();
1307
- const stack = [];
1308
- let end = 0;
1309
- return {
1310
- has(value) {
1311
- return refs.has(value);
1312
- },
1313
- push(value) {
1314
- refs.set(value, (refs.get(value) ?? 0) + 1);
1315
- stack[end] = value;
1316
- end++;
1317
- },
1318
- pop() {
1319
- end--;
1320
- Debug.assertGreaterThanOrEqual(end, 0);
1321
- const value = stack[end];
1322
- const refCount = refs.get(value) - 1;
1323
- if (refCount === 0) {
1324
- refs.delete(value);
1325
- } else {
1326
- refs.set(value, refCount);
1327
- }
1328
- return value;
1329
- },
1330
- get size() {
1331
- return end;
1332
- }
1333
- };
1334
- }
1335
1305
 
1336
1306
  // src/compiler/debug.ts
1337
1307
  var Debug;
@@ -34391,7 +34361,7 @@ var commandOptionsWithoutBuild = [
34391
34361
  strictFlag: true,
34392
34362
  category: Diagnostics.Type_Checking,
34393
34363
  description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
34394
- defaultValueDescription: false
34364
+ defaultValueDescription: Diagnostics.false_unless_strict_is_set
34395
34365
  },
34396
34366
  {
34397
34367
  name: "alwaysStrict",
@@ -56530,7 +56500,10 @@ function createTypeChecker(host) {
56530
56500
  }
56531
56501
  }
56532
56502
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
56533
- const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
56503
+ const templates = filter(
56504
+ types,
56505
+ (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types))
56506
+ );
56534
56507
  if (templates.length) {
56535
56508
  let i = types.length;
56536
56509
  while (i > 0) {
@@ -56935,15 +56908,19 @@ function createTypeChecker(host) {
56935
56908
  function getConstituentCountOfTypes(types) {
56936
56909
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
56937
56910
  }
56938
- function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) {
56939
- return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType;
56911
+ function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
56912
+ if (types.length !== 2) {
56913
+ return false;
56914
+ }
56915
+ const [t1, t2] = types;
56916
+ return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
56940
56917
  }
56941
56918
  function getTypeFromIntersectionTypeNode(node) {
56942
56919
  const links = getNodeLinks(node);
56943
56920
  if (!links.resolvedType) {
56944
56921
  const aliasSymbol = getAliasSymbolForTypeNode(node);
56945
56922
  const types = map(node.types, getTypeFromTypeNode);
56946
- const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0]));
56923
+ const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
56947
56924
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
56948
56925
  }
56949
56926
  return links.resolvedType;
@@ -59835,6 +59812,7 @@ function createTypeChecker(host) {
59835
59812
  let maybeKeys;
59836
59813
  let sourceStack;
59837
59814
  let targetStack;
59815
+ let maybeCount = 0;
59838
59816
  let sourceDepth = 0;
59839
59817
  let targetDepth = 0;
59840
59818
  let expandingFlags = 0 /* None */;
@@ -60700,13 +60678,10 @@ function createTypeChecker(host) {
60700
60678
  }
60701
60679
  }
60702
60680
  if (!maybeKeys) {
60703
- maybeKeys = createStackSet();
60681
+ maybeKeys = [];
60704
60682
  sourceStack = [];
60705
60683
  targetStack = [];
60706
60684
  } else {
60707
- if (maybeKeys.has(id)) {
60708
- return 3 /* Maybe */;
60709
- }
60710
60685
  const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
60711
60686
  source2,
60712
60687
  target2,
@@ -60715,16 +60690,19 @@ function createTypeChecker(host) {
60715
60690
  /*ignoreConstraints*/
60716
60691
  true
60717
60692
  ) : void 0;
60718
- if (broadestEquivalentId && maybeKeys.has(broadestEquivalentId)) {
60719
- return 3 /* Maybe */;
60693
+ for (let i = 0; i < maybeCount; i++) {
60694
+ if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
60695
+ return 3 /* Maybe */;
60696
+ }
60720
60697
  }
60721
60698
  if (sourceDepth === 100 || targetDepth === 100) {
60722
60699
  overflow = true;
60723
60700
  return 0 /* False */;
60724
60701
  }
60725
60702
  }
60726
- const maybeStart = maybeKeys.size;
60727
- maybeKeys.push(id);
60703
+ const maybeStart = maybeCount;
60704
+ maybeKeys[maybeCount] = id;
60705
+ maybeCount++;
60728
60706
  const saveExpandingFlags = expandingFlags;
60729
60707
  if (recursionFlags & 1 /* Source */) {
60730
60708
  sourceStack[sourceDepth] = source2;
@@ -60776,21 +60754,15 @@ function createTypeChecker(host) {
60776
60754
  if (result2) {
60777
60755
  if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
60778
60756
  if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
60779
- while (maybeKeys.size > maybeStart) {
60780
- const id2 = maybeKeys.pop();
60781
- relation.set(id2, 1 /* Succeeded */ | propagatingVarianceFlags);
60782
- }
60783
- } else {
60784
- while (maybeKeys.size > maybeStart) {
60785
- maybeKeys.pop();
60757
+ for (let i = maybeStart; i < maybeCount; i++) {
60758
+ relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
60786
60759
  }
60787
60760
  }
60761
+ maybeCount = maybeStart;
60788
60762
  }
60789
60763
  } else {
60790
60764
  relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
60791
- while (maybeKeys.size > maybeStart) {
60792
- maybeKeys.pop();
60793
- }
60765
+ maybeCount = maybeStart;
60794
60766
  }
60795
60767
  return result2;
60796
60768
  }
@@ -63374,6 +63346,9 @@ function createTypeChecker(host) {
63374
63346
  if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) {
63375
63347
  return true;
63376
63348
  }
63349
+ if (target.flags & 2097152 /* Intersection */) {
63350
+ return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t));
63351
+ }
63377
63352
  if (source.flags & 128 /* StringLiteral */) {
63378
63353
  const value = source.value;
63379
63354
  return !!(target.flags & 8 /* Number */ && isValidNumberString(
@@ -63384,7 +63359,7 @@ function createTypeChecker(host) {
63384
63359
  value,
63385
63360
  /*roundTripOnly*/
63386
63361
  false
63387
- ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target));
63362
+ ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target));
63388
63363
  }
63389
63364
  if (source.flags & 134217728 /* TemplateLiteral */) {
63390
63365
  const texts = source.texts;
@@ -80617,7 +80592,7 @@ function createTypeChecker(host) {
80617
80592
  function copyLocallyVisibleExportSymbols(source, meaning2) {
80618
80593
  if (meaning2) {
80619
80594
  source.forEach((symbol) => {
80620
- if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */)) {
80595
+ if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */) && symbol.escapedName !== "default" /* Default */) {
80621
80596
  copySymbol(symbol, meaning2);
80622
80597
  }
80623
80598
  });
package/lib/tsserver.js CHANGED
@@ -465,7 +465,6 @@ __export(server_exports, {
465
465
  createSourceFile: () => createSourceFile,
466
466
  createSourceMapGenerator: () => createSourceMapGenerator,
467
467
  createSourceMapSource: () => createSourceMapSource,
468
- createStackSet: () => createStackSet,
469
468
  createSuperAccessVariableStatement: () => createSuperAccessVariableStatement,
470
469
  createSymbolTable: () => createSymbolTable,
471
470
  createSymlinkCache: () => createSymlinkCache,
@@ -2332,7 +2331,7 @@ module.exports = __toCommonJS(server_exports);
2332
2331
 
2333
2332
  // src/compiler/corePublic.ts
2334
2333
  var versionMajorMinor = "5.2";
2335
- var version = `${versionMajorMinor}.0-insiders.20230801`;
2334
+ var version = `${versionMajorMinor}.0-insiders.20230802`;
2336
2335
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2337
2336
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2338
2337
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -4004,36 +4003,6 @@ function trimEndImpl(s) {
4004
4003
  function isNodeLikeSystem() {
4005
4004
  return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object";
4006
4005
  }
4007
- function createStackSet() {
4008
- const refs = /* @__PURE__ */ new Map();
4009
- const stack = [];
4010
- let end = 0;
4011
- return {
4012
- has(value) {
4013
- return refs.has(value);
4014
- },
4015
- push(value) {
4016
- refs.set(value, (refs.get(value) ?? 0) + 1);
4017
- stack[end] = value;
4018
- end++;
4019
- },
4020
- pop() {
4021
- end--;
4022
- Debug.assertGreaterThanOrEqual(end, 0);
4023
- const value = stack[end];
4024
- const refCount = refs.get(value) - 1;
4025
- if (refCount === 0) {
4026
- refs.delete(value);
4027
- } else {
4028
- refs.set(value, refCount);
4029
- }
4030
- return value;
4031
- },
4032
- get size() {
4033
- return end;
4034
- }
4035
- };
4036
- }
4037
4006
 
4038
4007
  // src/compiler/debug.ts
4039
4008
  var LogLevel = /* @__PURE__ */ ((LogLevel3) => {
@@ -38794,7 +38763,7 @@ var commandOptionsWithoutBuild = [
38794
38763
  strictFlag: true,
38795
38764
  category: Diagnostics.Type_Checking,
38796
38765
  description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
38797
- defaultValueDescription: false
38766
+ defaultValueDescription: Diagnostics.false_unless_strict_is_set
38798
38767
  },
38799
38768
  {
38800
38769
  name: "alwaysStrict",
@@ -61242,7 +61211,10 @@ function createTypeChecker(host) {
61242
61211
  }
61243
61212
  }
61244
61213
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
61245
- const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
61214
+ const templates = filter(
61215
+ types,
61216
+ (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types))
61217
+ );
61246
61218
  if (templates.length) {
61247
61219
  let i = types.length;
61248
61220
  while (i > 0) {
@@ -61647,15 +61619,19 @@ function createTypeChecker(host) {
61647
61619
  function getConstituentCountOfTypes(types) {
61648
61620
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
61649
61621
  }
61650
- function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) {
61651
- return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType;
61622
+ function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
61623
+ if (types.length !== 2) {
61624
+ return false;
61625
+ }
61626
+ const [t1, t2] = types;
61627
+ return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
61652
61628
  }
61653
61629
  function getTypeFromIntersectionTypeNode(node) {
61654
61630
  const links = getNodeLinks(node);
61655
61631
  if (!links.resolvedType) {
61656
61632
  const aliasSymbol = getAliasSymbolForTypeNode(node);
61657
61633
  const types = map(node.types, getTypeFromTypeNode);
61658
- const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0]));
61634
+ const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
61659
61635
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
61660
61636
  }
61661
61637
  return links.resolvedType;
@@ -64547,6 +64523,7 @@ function createTypeChecker(host) {
64547
64523
  let maybeKeys;
64548
64524
  let sourceStack;
64549
64525
  let targetStack;
64526
+ let maybeCount = 0;
64550
64527
  let sourceDepth = 0;
64551
64528
  let targetDepth = 0;
64552
64529
  let expandingFlags = 0 /* None */;
@@ -65412,13 +65389,10 @@ function createTypeChecker(host) {
65412
65389
  }
65413
65390
  }
65414
65391
  if (!maybeKeys) {
65415
- maybeKeys = createStackSet();
65392
+ maybeKeys = [];
65416
65393
  sourceStack = [];
65417
65394
  targetStack = [];
65418
65395
  } else {
65419
- if (maybeKeys.has(id)) {
65420
- return 3 /* Maybe */;
65421
- }
65422
65396
  const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
65423
65397
  source2,
65424
65398
  target2,
@@ -65427,16 +65401,19 @@ function createTypeChecker(host) {
65427
65401
  /*ignoreConstraints*/
65428
65402
  true
65429
65403
  ) : void 0;
65430
- if (broadestEquivalentId && maybeKeys.has(broadestEquivalentId)) {
65431
- return 3 /* Maybe */;
65404
+ for (let i = 0; i < maybeCount; i++) {
65405
+ if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
65406
+ return 3 /* Maybe */;
65407
+ }
65432
65408
  }
65433
65409
  if (sourceDepth === 100 || targetDepth === 100) {
65434
65410
  overflow = true;
65435
65411
  return 0 /* False */;
65436
65412
  }
65437
65413
  }
65438
- const maybeStart = maybeKeys.size;
65439
- maybeKeys.push(id);
65414
+ const maybeStart = maybeCount;
65415
+ maybeKeys[maybeCount] = id;
65416
+ maybeCount++;
65440
65417
  const saveExpandingFlags = expandingFlags;
65441
65418
  if (recursionFlags & 1 /* Source */) {
65442
65419
  sourceStack[sourceDepth] = source2;
@@ -65488,21 +65465,15 @@ function createTypeChecker(host) {
65488
65465
  if (result2) {
65489
65466
  if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
65490
65467
  if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
65491
- while (maybeKeys.size > maybeStart) {
65492
- const id2 = maybeKeys.pop();
65493
- relation.set(id2, 1 /* Succeeded */ | propagatingVarianceFlags);
65494
- }
65495
- } else {
65496
- while (maybeKeys.size > maybeStart) {
65497
- maybeKeys.pop();
65468
+ for (let i = maybeStart; i < maybeCount; i++) {
65469
+ relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
65498
65470
  }
65499
65471
  }
65472
+ maybeCount = maybeStart;
65500
65473
  }
65501
65474
  } else {
65502
65475
  relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
65503
- while (maybeKeys.size > maybeStart) {
65504
- maybeKeys.pop();
65505
- }
65476
+ maybeCount = maybeStart;
65506
65477
  }
65507
65478
  return result2;
65508
65479
  }
@@ -68086,6 +68057,9 @@ function createTypeChecker(host) {
68086
68057
  if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) {
68087
68058
  return true;
68088
68059
  }
68060
+ if (target.flags & 2097152 /* Intersection */) {
68061
+ return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t));
68062
+ }
68089
68063
  if (source.flags & 128 /* StringLiteral */) {
68090
68064
  const value = source.value;
68091
68065
  return !!(target.flags & 8 /* Number */ && isValidNumberString(
@@ -68096,7 +68070,7 @@ function createTypeChecker(host) {
68096
68070
  value,
68097
68071
  /*roundTripOnly*/
68098
68072
  false
68099
- ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target));
68073
+ ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target));
68100
68074
  }
68101
68075
  if (source.flags & 134217728 /* TemplateLiteral */) {
68102
68076
  const texts = source.texts;
@@ -85329,7 +85303,7 @@ function createTypeChecker(host) {
85329
85303
  function copyLocallyVisibleExportSymbols(source, meaning2) {
85330
85304
  if (meaning2) {
85331
85305
  source.forEach((symbol) => {
85332
- if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */)) {
85306
+ if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */) && symbol.escapedName !== "default" /* Default */) {
85333
85307
  copySymbol(symbol, meaning2);
85334
85308
  }
85335
85309
  });
@@ -172412,7 +172386,6 @@ __export(ts_exports2, {
172412
172386
  createSourceFile: () => createSourceFile,
172413
172387
  createSourceMapGenerator: () => createSourceMapGenerator,
172414
172388
  createSourceMapSource: () => createSourceMapSource,
172415
- createStackSet: () => createStackSet,
172416
172389
  createSuperAccessVariableStatement: () => createSuperAccessVariableStatement,
172417
172390
  createSymbolTable: () => createSymbolTable,
172418
172391
  createSymlinkCache: () => createSymlinkCache,
@@ -186943,7 +186916,6 @@ start(initializeNodeSystem(), require("os").platform());
186943
186916
  createSourceFile,
186944
186917
  createSourceMapGenerator,
186945
186918
  createSourceMapSource,
186946
- createStackSet,
186947
186919
  createSuperAccessVariableStatement,
186948
186920
  createSymbolTable,
186949
186921
  createSymlinkCache,
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.2";
38
- version = `${versionMajorMinor}.0-insiders.20230801`;
38
+ version = `${versionMajorMinor}.0-insiders.20230802`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -1621,36 +1621,6 @@ var ts = (() => {
1621
1621
  function isNodeLikeSystem() {
1622
1622
  return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object";
1623
1623
  }
1624
- function createStackSet() {
1625
- const refs = /* @__PURE__ */ new Map();
1626
- const stack = [];
1627
- let end = 0;
1628
- return {
1629
- has(value) {
1630
- return refs.has(value);
1631
- },
1632
- push(value) {
1633
- refs.set(value, (refs.get(value) ?? 0) + 1);
1634
- stack[end] = value;
1635
- end++;
1636
- },
1637
- pop() {
1638
- end--;
1639
- Debug.assertGreaterThanOrEqual(end, 0);
1640
- const value = stack[end];
1641
- const refCount = refs.get(value) - 1;
1642
- if (refCount === 0) {
1643
- refs.delete(value);
1644
- } else {
1645
- refs.set(value, refCount);
1646
- }
1647
- return value;
1648
- },
1649
- get size() {
1650
- return end;
1651
- }
1652
- };
1653
- }
1654
1624
  var emptyArray, emptyMap, emptySet, SortKind, elementAt, hasOwnProperty, fileNameLowerCaseRegExp, AssertionLevel, createUIStringComparer, uiComparerCaseSensitive, uiLocale, trimString, trimStringEnd, trimStringStart;
1655
1625
  var init_core = __esm({
1656
1626
  "src/compiler/core.ts"() {
@@ -38271,7 +38241,7 @@ ${lanes.join("\n")}
38271
38241
  strictFlag: true,
38272
38242
  category: Diagnostics.Type_Checking,
38273
38243
  description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
38274
- defaultValueDescription: false
38244
+ defaultValueDescription: Diagnostics.false_unless_strict_is_set
38275
38245
  },
38276
38246
  {
38277
38247
  name: "alwaysStrict",
@@ -59004,7 +58974,10 @@ ${lanes.join("\n")}
59004
58974
  }
59005
58975
  }
59006
58976
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
59007
- const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
58977
+ const templates = filter(
58978
+ types,
58979
+ (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types))
58980
+ );
59008
58981
  if (templates.length) {
59009
58982
  let i = types.length;
59010
58983
  while (i > 0) {
@@ -59409,15 +59382,19 @@ ${lanes.join("\n")}
59409
59382
  function getConstituentCountOfTypes(types) {
59410
59383
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
59411
59384
  }
59412
- function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) {
59413
- return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType;
59385
+ function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
59386
+ if (types.length !== 2) {
59387
+ return false;
59388
+ }
59389
+ const [t1, t2] = types;
59390
+ return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
59414
59391
  }
59415
59392
  function getTypeFromIntersectionTypeNode(node) {
59416
59393
  const links = getNodeLinks(node);
59417
59394
  if (!links.resolvedType) {
59418
59395
  const aliasSymbol = getAliasSymbolForTypeNode(node);
59419
59396
  const types = map(node.types, getTypeFromTypeNode);
59420
- const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0]));
59397
+ const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
59421
59398
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
59422
59399
  }
59423
59400
  return links.resolvedType;
@@ -62309,6 +62286,7 @@ ${lanes.join("\n")}
62309
62286
  let maybeKeys;
62310
62287
  let sourceStack;
62311
62288
  let targetStack;
62289
+ let maybeCount = 0;
62312
62290
  let sourceDepth = 0;
62313
62291
  let targetDepth = 0;
62314
62292
  let expandingFlags = 0 /* None */;
@@ -63174,13 +63152,10 @@ ${lanes.join("\n")}
63174
63152
  }
63175
63153
  }
63176
63154
  if (!maybeKeys) {
63177
- maybeKeys = createStackSet();
63155
+ maybeKeys = [];
63178
63156
  sourceStack = [];
63179
63157
  targetStack = [];
63180
63158
  } else {
63181
- if (maybeKeys.has(id)) {
63182
- return 3 /* Maybe */;
63183
- }
63184
63159
  const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
63185
63160
  source2,
63186
63161
  target2,
@@ -63189,16 +63164,19 @@ ${lanes.join("\n")}
63189
63164
  /*ignoreConstraints*/
63190
63165
  true
63191
63166
  ) : void 0;
63192
- if (broadestEquivalentId && maybeKeys.has(broadestEquivalentId)) {
63193
- return 3 /* Maybe */;
63167
+ for (let i = 0; i < maybeCount; i++) {
63168
+ if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
63169
+ return 3 /* Maybe */;
63170
+ }
63194
63171
  }
63195
63172
  if (sourceDepth === 100 || targetDepth === 100) {
63196
63173
  overflow = true;
63197
63174
  return 0 /* False */;
63198
63175
  }
63199
63176
  }
63200
- const maybeStart = maybeKeys.size;
63201
- maybeKeys.push(id);
63177
+ const maybeStart = maybeCount;
63178
+ maybeKeys[maybeCount] = id;
63179
+ maybeCount++;
63202
63180
  const saveExpandingFlags = expandingFlags;
63203
63181
  if (recursionFlags & 1 /* Source */) {
63204
63182
  sourceStack[sourceDepth] = source2;
@@ -63250,21 +63228,15 @@ ${lanes.join("\n")}
63250
63228
  if (result2) {
63251
63229
  if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
63252
63230
  if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
63253
- while (maybeKeys.size > maybeStart) {
63254
- const id2 = maybeKeys.pop();
63255
- relation.set(id2, 1 /* Succeeded */ | propagatingVarianceFlags);
63256
- }
63257
- } else {
63258
- while (maybeKeys.size > maybeStart) {
63259
- maybeKeys.pop();
63231
+ for (let i = maybeStart; i < maybeCount; i++) {
63232
+ relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
63260
63233
  }
63261
63234
  }
63235
+ maybeCount = maybeStart;
63262
63236
  }
63263
63237
  } else {
63264
63238
  relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
63265
- while (maybeKeys.size > maybeStart) {
63266
- maybeKeys.pop();
63267
- }
63239
+ maybeCount = maybeStart;
63268
63240
  }
63269
63241
  return result2;
63270
63242
  }
@@ -65848,6 +65820,9 @@ ${lanes.join("\n")}
65848
65820
  if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) {
65849
65821
  return true;
65850
65822
  }
65823
+ if (target.flags & 2097152 /* Intersection */) {
65824
+ return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t));
65825
+ }
65851
65826
  if (source.flags & 128 /* StringLiteral */) {
65852
65827
  const value = source.value;
65853
65828
  return !!(target.flags & 8 /* Number */ && isValidNumberString(
@@ -65858,7 +65833,7 @@ ${lanes.join("\n")}
65858
65833
  value,
65859
65834
  /*roundTripOnly*/
65860
65835
  false
65861
- ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target));
65836
+ ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target));
65862
65837
  }
65863
65838
  if (source.flags & 134217728 /* TemplateLiteral */) {
65864
65839
  const texts = source.texts;
@@ -83091,7 +83066,7 @@ ${lanes.join("\n")}
83091
83066
  function copyLocallyVisibleExportSymbols(source, meaning2) {
83092
83067
  if (meaning2) {
83093
83068
  source.forEach((symbol) => {
83094
- if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */)) {
83069
+ if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */) && symbol.escapedName !== "default" /* Default */) {
83095
83070
  copySymbol(symbol, meaning2);
83096
83071
  }
83097
83072
  });
@@ -183560,7 +183535,6 @@ ${e.message}`;
183560
183535
  createSourceFile: () => createSourceFile,
183561
183536
  createSourceMapGenerator: () => createSourceMapGenerator,
183562
183537
  createSourceMapSource: () => createSourceMapSource,
183563
- createStackSet: () => createStackSet,
183564
183538
  createSuperAccessVariableStatement: () => createSuperAccessVariableStatement,
183565
183539
  createSymbolTable: () => createSymbolTable,
183566
183540
  createSymlinkCache: () => createSymlinkCache,
@@ -185968,7 +185942,6 @@ ${e.message}`;
185968
185942
  createSourceFile: () => createSourceFile,
185969
185943
  createSourceMapGenerator: () => createSourceMapGenerator,
185970
185944
  createSourceMapSource: () => createSourceMapSource,
185971
- createStackSet: () => createStackSet,
185972
185945
  createSuperAccessVariableStatement: () => createSuperAccessVariableStatement,
185973
185946
  createSymbolTable: () => createSymbolTable,
185974
185947
  createSymlinkCache: () => createSymlinkCache,
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.2";
38
- version = `${versionMajorMinor}.0-insiders.20230801`;
38
+ version = `${versionMajorMinor}.0-insiders.20230802`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -1621,36 +1621,6 @@ var ts = (() => {
1621
1621
  function isNodeLikeSystem() {
1622
1622
  return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object";
1623
1623
  }
1624
- function createStackSet() {
1625
- const refs = /* @__PURE__ */ new Map();
1626
- const stack = [];
1627
- let end = 0;
1628
- return {
1629
- has(value) {
1630
- return refs.has(value);
1631
- },
1632
- push(value) {
1633
- refs.set(value, (refs.get(value) ?? 0) + 1);
1634
- stack[end] = value;
1635
- end++;
1636
- },
1637
- pop() {
1638
- end--;
1639
- Debug.assertGreaterThanOrEqual(end, 0);
1640
- const value = stack[end];
1641
- const refCount = refs.get(value) - 1;
1642
- if (refCount === 0) {
1643
- refs.delete(value);
1644
- } else {
1645
- refs.set(value, refCount);
1646
- }
1647
- return value;
1648
- },
1649
- get size() {
1650
- return end;
1651
- }
1652
- };
1653
- }
1654
1624
  var emptyArray, emptyMap, emptySet, SortKind, elementAt, hasOwnProperty, fileNameLowerCaseRegExp, AssertionLevel, createUIStringComparer, uiComparerCaseSensitive, uiLocale, trimString, trimStringEnd, trimStringStart;
1655
1625
  var init_core = __esm({
1656
1626
  "src/compiler/core.ts"() {
@@ -38271,7 +38241,7 @@ ${lanes.join("\n")}
38271
38241
  strictFlag: true,
38272
38242
  category: Diagnostics.Type_Checking,
38273
38243
  description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
38274
- defaultValueDescription: false
38244
+ defaultValueDescription: Diagnostics.false_unless_strict_is_set
38275
38245
  },
38276
38246
  {
38277
38247
  name: "alwaysStrict",
@@ -59004,7 +58974,10 @@ ${lanes.join("\n")}
59004
58974
  }
59005
58975
  }
59006
58976
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
59007
- const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
58977
+ const templates = filter(
58978
+ types,
58979
+ (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types))
58980
+ );
59008
58981
  if (templates.length) {
59009
58982
  let i = types.length;
59010
58983
  while (i > 0) {
@@ -59409,15 +59382,19 @@ ${lanes.join("\n")}
59409
59382
  function getConstituentCountOfTypes(types) {
59410
59383
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
59411
59384
  }
59412
- function areIntersectedTypesAvoidingPrimitiveReduction(t1, t2) {
59413
- return !!(t1.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) && t2 === emptyTypeLiteralType;
59385
+ function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
59386
+ if (types.length !== 2) {
59387
+ return false;
59388
+ }
59389
+ const [t1, t2] = types;
59390
+ return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
59414
59391
  }
59415
59392
  function getTypeFromIntersectionTypeNode(node) {
59416
59393
  const links = getNodeLinks(node);
59417
59394
  if (!links.resolvedType) {
59418
59395
  const aliasSymbol = getAliasSymbolForTypeNode(node);
59419
59396
  const types = map(node.types, getTypeFromTypeNode);
59420
- const noSupertypeReduction = types.length === 2 && (areIntersectedTypesAvoidingPrimitiveReduction(types[0], types[1]) || areIntersectedTypesAvoidingPrimitiveReduction(types[1], types[0]));
59397
+ const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
59421
59398
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
59422
59399
  }
59423
59400
  return links.resolvedType;
@@ -62309,6 +62286,7 @@ ${lanes.join("\n")}
62309
62286
  let maybeKeys;
62310
62287
  let sourceStack;
62311
62288
  let targetStack;
62289
+ let maybeCount = 0;
62312
62290
  let sourceDepth = 0;
62313
62291
  let targetDepth = 0;
62314
62292
  let expandingFlags = 0 /* None */;
@@ -63174,13 +63152,10 @@ ${lanes.join("\n")}
63174
63152
  }
63175
63153
  }
63176
63154
  if (!maybeKeys) {
63177
- maybeKeys = createStackSet();
63155
+ maybeKeys = [];
63178
63156
  sourceStack = [];
63179
63157
  targetStack = [];
63180
63158
  } else {
63181
- if (maybeKeys.has(id)) {
63182
- return 3 /* Maybe */;
63183
- }
63184
63159
  const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
63185
63160
  source2,
63186
63161
  target2,
@@ -63189,16 +63164,19 @@ ${lanes.join("\n")}
63189
63164
  /*ignoreConstraints*/
63190
63165
  true
63191
63166
  ) : void 0;
63192
- if (broadestEquivalentId && maybeKeys.has(broadestEquivalentId)) {
63193
- return 3 /* Maybe */;
63167
+ for (let i = 0; i < maybeCount; i++) {
63168
+ if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
63169
+ return 3 /* Maybe */;
63170
+ }
63194
63171
  }
63195
63172
  if (sourceDepth === 100 || targetDepth === 100) {
63196
63173
  overflow = true;
63197
63174
  return 0 /* False */;
63198
63175
  }
63199
63176
  }
63200
- const maybeStart = maybeKeys.size;
63201
- maybeKeys.push(id);
63177
+ const maybeStart = maybeCount;
63178
+ maybeKeys[maybeCount] = id;
63179
+ maybeCount++;
63202
63180
  const saveExpandingFlags = expandingFlags;
63203
63181
  if (recursionFlags & 1 /* Source */) {
63204
63182
  sourceStack[sourceDepth] = source2;
@@ -63250,21 +63228,15 @@ ${lanes.join("\n")}
63250
63228
  if (result2) {
63251
63229
  if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
63252
63230
  if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
63253
- while (maybeKeys.size > maybeStart) {
63254
- const id2 = maybeKeys.pop();
63255
- relation.set(id2, 1 /* Succeeded */ | propagatingVarianceFlags);
63256
- }
63257
- } else {
63258
- while (maybeKeys.size > maybeStart) {
63259
- maybeKeys.pop();
63231
+ for (let i = maybeStart; i < maybeCount; i++) {
63232
+ relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
63260
63233
  }
63261
63234
  }
63235
+ maybeCount = maybeStart;
63262
63236
  }
63263
63237
  } else {
63264
63238
  relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
63265
- while (maybeKeys.size > maybeStart) {
63266
- maybeKeys.pop();
63267
- }
63239
+ maybeCount = maybeStart;
63268
63240
  }
63269
63241
  return result2;
63270
63242
  }
@@ -65848,6 +65820,9 @@ ${lanes.join("\n")}
65848
65820
  if (source === target || target.flags & (1 /* Any */ | 4 /* String */)) {
65849
65821
  return true;
65850
65822
  }
65823
+ if (target.flags & 2097152 /* Intersection */) {
65824
+ return every(target.types, (t) => t === emptyTypeLiteralType || isValidTypeForTemplateLiteralPlaceholder(source, t));
65825
+ }
65851
65826
  if (source.flags & 128 /* StringLiteral */) {
65852
65827
  const value = source.value;
65853
65828
  return !!(target.flags & 8 /* Number */ && isValidNumberString(
@@ -65858,7 +65833,7 @@ ${lanes.join("\n")}
65858
65833
  value,
65859
65834
  /*roundTripOnly*/
65860
65835
  false
65861
- ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target));
65836
+ ) || target.flags & (512 /* BooleanLiteral */ | 98304 /* Nullable */) && value === target.intrinsicName || target.flags & 268435456 /* StringMapping */ && isMemberOfStringMapping(getStringLiteralType(value), target) || target.flags & 134217728 /* TemplateLiteral */ && isTypeMatchedByTemplateLiteralType(source, target));
65862
65837
  }
65863
65838
  if (source.flags & 134217728 /* TemplateLiteral */) {
65864
65839
  const texts = source.texts;
@@ -83091,7 +83066,7 @@ ${lanes.join("\n")}
83091
83066
  function copyLocallyVisibleExportSymbols(source, meaning2) {
83092
83067
  if (meaning2) {
83093
83068
  source.forEach((symbol) => {
83094
- if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */)) {
83069
+ if (!getDeclarationOfKind(symbol, 281 /* ExportSpecifier */) && !getDeclarationOfKind(symbol, 280 /* NamespaceExport */) && symbol.escapedName !== "default" /* Default */) {
83095
83070
  copySymbol(symbol, meaning2);
83096
83071
  }
83097
83072
  });
@@ -172169,7 +172144,6 @@ ${options.prefix}` : "\n" : options.prefix
172169
172144
  createSourceFile: () => createSourceFile,
172170
172145
  createSourceMapGenerator: () => createSourceMapGenerator,
172171
172146
  createSourceMapSource: () => createSourceMapSource,
172172
- createStackSet: () => createStackSet,
172173
172147
  createSuperAccessVariableStatement: () => createSuperAccessVariableStatement,
172174
172148
  createSymbolTable: () => createSymbolTable,
172175
172149
  createSymlinkCache: () => createSymlinkCache,
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.2";
57
- var version = `${versionMajorMinor}.0-insiders.20230801`;
57
+ var version = `${versionMajorMinor}.0-insiders.20230802`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -26242,7 +26242,7 @@ var commandOptionsWithoutBuild = [
26242
26242
  strictFlag: true,
26243
26243
  category: Diagnostics.Type_Checking,
26244
26244
  description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
26245
- defaultValueDescription: false
26245
+ defaultValueDescription: Diagnostics.false_unless_strict_is_set
26246
26246
  },
26247
26247
  {
26248
26248
  name: "alwaysStrict",
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.2.0-pr-55224-9",
5
+ "version": "5.2.0-pr-54188-13",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -114,5 +114,5 @@
114
114
  "node": "20.1.0",
115
115
  "npm": "8.19.4"
116
116
  },
117
- "gitHead": "555315567c5e1c558a465e4b028863ac2d90a7e5"
117
+ "gitHead": "08166eec11a10ac63736bafab1dd536724efd765"
118
118
  }