@typescript-deploys/pr-build 5.2.0-pr-55214-6 → 5.2.0-pr-55224-9

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.20230731`;
21
+ var version = `${versionMajorMinor}.0-insiders.20230801`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -1302,6 +1302,36 @@ 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
+ }
1305
1335
 
1306
1336
  // src/compiler/debug.ts
1307
1337
  var Debug;
@@ -53610,7 +53640,7 @@ function createTypeChecker(host) {
53610
53640
  if (baseConstructorIndexInfo) {
53611
53641
  indexInfos = append(indexInfos, baseConstructorIndexInfo);
53612
53642
  }
53613
- if (symbol.flags & 256 /* RegularEnum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || some(type.properties, (prop) => !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */)))) {
53643
+ if (symbol.flags & 384 /* Enum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || some(type.properties, (prop) => !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */)))) {
53614
53644
  indexInfos = append(indexInfos, enumNumberIndexInfo);
53615
53645
  }
53616
53646
  }
@@ -59805,7 +59835,6 @@ function createTypeChecker(host) {
59805
59835
  let maybeKeys;
59806
59836
  let sourceStack;
59807
59837
  let targetStack;
59808
- let maybeCount = 0;
59809
59838
  let sourceDepth = 0;
59810
59839
  let targetDepth = 0;
59811
59840
  let expandingFlags = 0 /* None */;
@@ -60671,10 +60700,13 @@ function createTypeChecker(host) {
60671
60700
  }
60672
60701
  }
60673
60702
  if (!maybeKeys) {
60674
- maybeKeys = [];
60703
+ maybeKeys = createStackSet();
60675
60704
  sourceStack = [];
60676
60705
  targetStack = [];
60677
60706
  } else {
60707
+ if (maybeKeys.has(id)) {
60708
+ return 3 /* Maybe */;
60709
+ }
60678
60710
  const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
60679
60711
  source2,
60680
60712
  target2,
@@ -60683,19 +60715,16 @@ function createTypeChecker(host) {
60683
60715
  /*ignoreConstraints*/
60684
60716
  true
60685
60717
  ) : void 0;
60686
- for (let i = 0; i < maybeCount; i++) {
60687
- if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
60688
- return 3 /* Maybe */;
60689
- }
60718
+ if (broadestEquivalentId && maybeKeys.has(broadestEquivalentId)) {
60719
+ return 3 /* Maybe */;
60690
60720
  }
60691
60721
  if (sourceDepth === 100 || targetDepth === 100) {
60692
60722
  overflow = true;
60693
60723
  return 0 /* False */;
60694
60724
  }
60695
60725
  }
60696
- const maybeStart = maybeCount;
60697
- maybeKeys[maybeCount] = id;
60698
- maybeCount++;
60726
+ const maybeStart = maybeKeys.size;
60727
+ maybeKeys.push(id);
60699
60728
  const saveExpandingFlags = expandingFlags;
60700
60729
  if (recursionFlags & 1 /* Source */) {
60701
60730
  sourceStack[sourceDepth] = source2;
@@ -60747,15 +60776,21 @@ function createTypeChecker(host) {
60747
60776
  if (result2) {
60748
60777
  if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
60749
60778
  if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
60750
- for (let i = maybeStart; i < maybeCount; i++) {
60751
- relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
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();
60752
60786
  }
60753
60787
  }
60754
- maybeCount = maybeStart;
60755
60788
  }
60756
60789
  } else {
60757
60790
  relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
60758
- maybeCount = maybeStart;
60791
+ while (maybeKeys.size > maybeStart) {
60792
+ maybeKeys.pop();
60793
+ }
60759
60794
  }
60760
60795
  return result2;
60761
60796
  }
@@ -88647,7 +88682,7 @@ function transformTypeScript(context) {
88647
88682
  const constantValue = tryGetConstEnumValue(node);
88648
88683
  if (constantValue !== void 0) {
88649
88684
  setConstantValue(node, constantValue);
88650
- const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : factory2.createNumericLiteral(constantValue);
88685
+ const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constantValue))) : factory2.createNumericLiteral(constantValue);
88651
88686
  if (!compilerOptions.removeComments) {
88652
88687
  const originalNode = getOriginalNode(node, isAccessExpression);
88653
88688
  addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `);
@@ -110922,7 +110957,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
110922
110957
  return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */));
110923
110958
  } else if (isAccessExpression(expression)) {
110924
110959
  const constantValue = getConstantValue(expression);
110925
- return typeof constantValue === "number" && isFinite(constantValue) && Math.floor(constantValue) === constantValue;
110960
+ return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue;
110926
110961
  }
110927
110962
  }
110928
110963
  function emitElementAccessExpression(node) {
package/lib/tsserver.js CHANGED
@@ -465,6 +465,7 @@ __export(server_exports, {
465
465
  createSourceFile: () => createSourceFile,
466
466
  createSourceMapGenerator: () => createSourceMapGenerator,
467
467
  createSourceMapSource: () => createSourceMapSource,
468
+ createStackSet: () => createStackSet,
468
469
  createSuperAccessVariableStatement: () => createSuperAccessVariableStatement,
469
470
  createSymbolTable: () => createSymbolTable,
470
471
  createSymlinkCache: () => createSymlinkCache,
@@ -2331,7 +2332,7 @@ module.exports = __toCommonJS(server_exports);
2331
2332
 
2332
2333
  // src/compiler/corePublic.ts
2333
2334
  var versionMajorMinor = "5.2";
2334
- var version = `${versionMajorMinor}.0-insiders.20230731`;
2335
+ var version = `${versionMajorMinor}.0-insiders.20230801`;
2335
2336
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2336
2337
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2337
2338
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -4003,6 +4004,36 @@ function trimEndImpl(s) {
4003
4004
  function isNodeLikeSystem() {
4004
4005
  return typeof process !== "undefined" && !!process.nextTick && !process.browser && typeof module === "object";
4005
4006
  }
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
+ }
4006
4037
 
4007
4038
  // src/compiler/debug.ts
4008
4039
  var LogLevel = /* @__PURE__ */ ((LogLevel3) => {
@@ -58321,7 +58352,7 @@ function createTypeChecker(host) {
58321
58352
  if (baseConstructorIndexInfo) {
58322
58353
  indexInfos = append(indexInfos, baseConstructorIndexInfo);
58323
58354
  }
58324
- if (symbol.flags & 256 /* RegularEnum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || some(type.properties, (prop) => !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */)))) {
58355
+ if (symbol.flags & 384 /* Enum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || some(type.properties, (prop) => !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */)))) {
58325
58356
  indexInfos = append(indexInfos, enumNumberIndexInfo);
58326
58357
  }
58327
58358
  }
@@ -64516,7 +64547,6 @@ function createTypeChecker(host) {
64516
64547
  let maybeKeys;
64517
64548
  let sourceStack;
64518
64549
  let targetStack;
64519
- let maybeCount = 0;
64520
64550
  let sourceDepth = 0;
64521
64551
  let targetDepth = 0;
64522
64552
  let expandingFlags = 0 /* None */;
@@ -65382,10 +65412,13 @@ function createTypeChecker(host) {
65382
65412
  }
65383
65413
  }
65384
65414
  if (!maybeKeys) {
65385
- maybeKeys = [];
65415
+ maybeKeys = createStackSet();
65386
65416
  sourceStack = [];
65387
65417
  targetStack = [];
65388
65418
  } else {
65419
+ if (maybeKeys.has(id)) {
65420
+ return 3 /* Maybe */;
65421
+ }
65389
65422
  const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
65390
65423
  source2,
65391
65424
  target2,
@@ -65394,19 +65427,16 @@ function createTypeChecker(host) {
65394
65427
  /*ignoreConstraints*/
65395
65428
  true
65396
65429
  ) : void 0;
65397
- for (let i = 0; i < maybeCount; i++) {
65398
- if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
65399
- return 3 /* Maybe */;
65400
- }
65430
+ if (broadestEquivalentId && maybeKeys.has(broadestEquivalentId)) {
65431
+ return 3 /* Maybe */;
65401
65432
  }
65402
65433
  if (sourceDepth === 100 || targetDepth === 100) {
65403
65434
  overflow = true;
65404
65435
  return 0 /* False */;
65405
65436
  }
65406
65437
  }
65407
- const maybeStart = maybeCount;
65408
- maybeKeys[maybeCount] = id;
65409
- maybeCount++;
65438
+ const maybeStart = maybeKeys.size;
65439
+ maybeKeys.push(id);
65410
65440
  const saveExpandingFlags = expandingFlags;
65411
65441
  if (recursionFlags & 1 /* Source */) {
65412
65442
  sourceStack[sourceDepth] = source2;
@@ -65458,15 +65488,21 @@ function createTypeChecker(host) {
65458
65488
  if (result2) {
65459
65489
  if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
65460
65490
  if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
65461
- for (let i = maybeStart; i < maybeCount; i++) {
65462
- relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
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();
65463
65498
  }
65464
65499
  }
65465
- maybeCount = maybeStart;
65466
65500
  }
65467
65501
  } else {
65468
65502
  relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
65469
- maybeCount = maybeStart;
65503
+ while (maybeKeys.size > maybeStart) {
65504
+ maybeKeys.pop();
65505
+ }
65470
65506
  }
65471
65507
  return result2;
65472
65508
  }
@@ -93529,7 +93565,7 @@ function transformTypeScript(context) {
93529
93565
  const constantValue = tryGetConstEnumValue(node);
93530
93566
  if (constantValue !== void 0) {
93531
93567
  setConstantValue(node, constantValue);
93532
- const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : factory2.createNumericLiteral(constantValue);
93568
+ const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constantValue))) : factory2.createNumericLiteral(constantValue);
93533
93569
  if (!compilerOptions.removeComments) {
93534
93570
  const originalNode = getOriginalNode(node, isAccessExpression);
93535
93571
  addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `);
@@ -115815,7 +115851,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
115815
115851
  return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */));
115816
115852
  } else if (isAccessExpression(expression)) {
115817
115853
  const constantValue = getConstantValue(expression);
115818
- return typeof constantValue === "number" && isFinite(constantValue) && Math.floor(constantValue) === constantValue;
115854
+ return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue;
115819
115855
  }
115820
115856
  }
115821
115857
  function emitElementAccessExpression(node) {
@@ -172376,6 +172412,7 @@ __export(ts_exports2, {
172376
172412
  createSourceFile: () => createSourceFile,
172377
172413
  createSourceMapGenerator: () => createSourceMapGenerator,
172378
172414
  createSourceMapSource: () => createSourceMapSource,
172415
+ createStackSet: () => createStackSet,
172379
172416
  createSuperAccessVariableStatement: () => createSuperAccessVariableStatement,
172380
172417
  createSymbolTable: () => createSymbolTable,
172381
172418
  createSymlinkCache: () => createSymlinkCache,
@@ -186906,6 +186943,7 @@ start(initializeNodeSystem(), require("os").platform());
186906
186943
  createSourceFile,
186907
186944
  createSourceMapGenerator,
186908
186945
  createSourceMapSource,
186946
+ createStackSet,
186909
186947
  createSuperAccessVariableStatement,
186910
186948
  createSymbolTable,
186911
186949
  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.20230731`;
38
+ version = `${versionMajorMinor}.0-insiders.20230801`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -1621,6 +1621,36 @@ 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
+ }
1624
1654
  var emptyArray, emptyMap, emptySet, SortKind, elementAt, hasOwnProperty, fileNameLowerCaseRegExp, AssertionLevel, createUIStringComparer, uiComparerCaseSensitive, uiLocale, trimString, trimStringEnd, trimStringStart;
1625
1655
  var init_core = __esm({
1626
1656
  "src/compiler/core.ts"() {
@@ -56084,7 +56114,7 @@ ${lanes.join("\n")}
56084
56114
  if (baseConstructorIndexInfo) {
56085
56115
  indexInfos = append(indexInfos, baseConstructorIndexInfo);
56086
56116
  }
56087
- if (symbol.flags & 256 /* RegularEnum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || some(type.properties, (prop) => !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */)))) {
56117
+ if (symbol.flags & 384 /* Enum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || some(type.properties, (prop) => !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */)))) {
56088
56118
  indexInfos = append(indexInfos, enumNumberIndexInfo);
56089
56119
  }
56090
56120
  }
@@ -62279,7 +62309,6 @@ ${lanes.join("\n")}
62279
62309
  let maybeKeys;
62280
62310
  let sourceStack;
62281
62311
  let targetStack;
62282
- let maybeCount = 0;
62283
62312
  let sourceDepth = 0;
62284
62313
  let targetDepth = 0;
62285
62314
  let expandingFlags = 0 /* None */;
@@ -63145,10 +63174,13 @@ ${lanes.join("\n")}
63145
63174
  }
63146
63175
  }
63147
63176
  if (!maybeKeys) {
63148
- maybeKeys = [];
63177
+ maybeKeys = createStackSet();
63149
63178
  sourceStack = [];
63150
63179
  targetStack = [];
63151
63180
  } else {
63181
+ if (maybeKeys.has(id)) {
63182
+ return 3 /* Maybe */;
63183
+ }
63152
63184
  const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
63153
63185
  source2,
63154
63186
  target2,
@@ -63157,19 +63189,16 @@ ${lanes.join("\n")}
63157
63189
  /*ignoreConstraints*/
63158
63190
  true
63159
63191
  ) : void 0;
63160
- for (let i = 0; i < maybeCount; i++) {
63161
- if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
63162
- return 3 /* Maybe */;
63163
- }
63192
+ if (broadestEquivalentId && maybeKeys.has(broadestEquivalentId)) {
63193
+ return 3 /* Maybe */;
63164
63194
  }
63165
63195
  if (sourceDepth === 100 || targetDepth === 100) {
63166
63196
  overflow = true;
63167
63197
  return 0 /* False */;
63168
63198
  }
63169
63199
  }
63170
- const maybeStart = maybeCount;
63171
- maybeKeys[maybeCount] = id;
63172
- maybeCount++;
63200
+ const maybeStart = maybeKeys.size;
63201
+ maybeKeys.push(id);
63173
63202
  const saveExpandingFlags = expandingFlags;
63174
63203
  if (recursionFlags & 1 /* Source */) {
63175
63204
  sourceStack[sourceDepth] = source2;
@@ -63221,15 +63250,21 @@ ${lanes.join("\n")}
63221
63250
  if (result2) {
63222
63251
  if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
63223
63252
  if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
63224
- for (let i = maybeStart; i < maybeCount; i++) {
63225
- relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
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();
63226
63260
  }
63227
63261
  }
63228
- maybeCount = maybeStart;
63229
63262
  }
63230
63263
  } else {
63231
63264
  relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
63232
- maybeCount = maybeStart;
63265
+ while (maybeKeys.size > maybeStart) {
63266
+ maybeKeys.pop();
63267
+ }
63233
63268
  }
63234
63269
  return result2;
63235
63270
  }
@@ -91473,7 +91508,7 @@ ${lanes.join("\n")}
91473
91508
  const constantValue = tryGetConstEnumValue(node);
91474
91509
  if (constantValue !== void 0) {
91475
91510
  setConstantValue(node, constantValue);
91476
- const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : factory2.createNumericLiteral(constantValue);
91511
+ const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constantValue))) : factory2.createNumericLiteral(constantValue);
91477
91512
  if (!compilerOptions.removeComments) {
91478
91513
  const originalNode = getOriginalNode(node, isAccessExpression);
91479
91514
  addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `);
@@ -113856,7 +113891,7 @@ ${lanes.join("\n")}
113856
113891
  return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */));
113857
113892
  } else if (isAccessExpression(expression)) {
113858
113893
  const constantValue = getConstantValue(expression);
113859
- return typeof constantValue === "number" && isFinite(constantValue) && Math.floor(constantValue) === constantValue;
113894
+ return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue;
113860
113895
  }
113861
113896
  }
113862
113897
  function emitElementAccessExpression(node) {
@@ -183525,6 +183560,7 @@ ${e.message}`;
183525
183560
  createSourceFile: () => createSourceFile,
183526
183561
  createSourceMapGenerator: () => createSourceMapGenerator,
183527
183562
  createSourceMapSource: () => createSourceMapSource,
183563
+ createStackSet: () => createStackSet,
183528
183564
  createSuperAccessVariableStatement: () => createSuperAccessVariableStatement,
183529
183565
  createSymbolTable: () => createSymbolTable,
183530
183566
  createSymlinkCache: () => createSymlinkCache,
@@ -185932,6 +185968,7 @@ ${e.message}`;
185932
185968
  createSourceFile: () => createSourceFile,
185933
185969
  createSourceMapGenerator: () => createSourceMapGenerator,
185934
185970
  createSourceMapSource: () => createSourceMapSource,
185971
+ createStackSet: () => createStackSet,
185935
185972
  createSuperAccessVariableStatement: () => createSuperAccessVariableStatement,
185936
185973
  createSymbolTable: () => createSymbolTable,
185937
185974
  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.20230731`;
38
+ version = `${versionMajorMinor}.0-insiders.20230801`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -1621,6 +1621,36 @@ 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
+ }
1624
1654
  var emptyArray, emptyMap, emptySet, SortKind, elementAt, hasOwnProperty, fileNameLowerCaseRegExp, AssertionLevel, createUIStringComparer, uiComparerCaseSensitive, uiLocale, trimString, trimStringEnd, trimStringStart;
1625
1655
  var init_core = __esm({
1626
1656
  "src/compiler/core.ts"() {
@@ -56084,7 +56114,7 @@ ${lanes.join("\n")}
56084
56114
  if (baseConstructorIndexInfo) {
56085
56115
  indexInfos = append(indexInfos, baseConstructorIndexInfo);
56086
56116
  }
56087
- if (symbol.flags & 256 /* RegularEnum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || some(type.properties, (prop) => !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */)))) {
56117
+ if (symbol.flags & 384 /* Enum */ && (getDeclaredTypeOfSymbol(symbol).flags & 32 /* Enum */ || some(type.properties, (prop) => !!(getTypeOfSymbol(prop).flags & 296 /* NumberLike */)))) {
56088
56118
  indexInfos = append(indexInfos, enumNumberIndexInfo);
56089
56119
  }
56090
56120
  }
@@ -62279,7 +62309,6 @@ ${lanes.join("\n")}
62279
62309
  let maybeKeys;
62280
62310
  let sourceStack;
62281
62311
  let targetStack;
62282
- let maybeCount = 0;
62283
62312
  let sourceDepth = 0;
62284
62313
  let targetDepth = 0;
62285
62314
  let expandingFlags = 0 /* None */;
@@ -63145,10 +63174,13 @@ ${lanes.join("\n")}
63145
63174
  }
63146
63175
  }
63147
63176
  if (!maybeKeys) {
63148
- maybeKeys = [];
63177
+ maybeKeys = createStackSet();
63149
63178
  sourceStack = [];
63150
63179
  targetStack = [];
63151
63180
  } else {
63181
+ if (maybeKeys.has(id)) {
63182
+ return 3 /* Maybe */;
63183
+ }
63152
63184
  const broadestEquivalentId = id.startsWith("*") ? getRelationKey(
63153
63185
  source2,
63154
63186
  target2,
@@ -63157,19 +63189,16 @@ ${lanes.join("\n")}
63157
63189
  /*ignoreConstraints*/
63158
63190
  true
63159
63191
  ) : void 0;
63160
- for (let i = 0; i < maybeCount; i++) {
63161
- if (id === maybeKeys[i] || broadestEquivalentId && broadestEquivalentId === maybeKeys[i]) {
63162
- return 3 /* Maybe */;
63163
- }
63192
+ if (broadestEquivalentId && maybeKeys.has(broadestEquivalentId)) {
63193
+ return 3 /* Maybe */;
63164
63194
  }
63165
63195
  if (sourceDepth === 100 || targetDepth === 100) {
63166
63196
  overflow = true;
63167
63197
  return 0 /* False */;
63168
63198
  }
63169
63199
  }
63170
- const maybeStart = maybeCount;
63171
- maybeKeys[maybeCount] = id;
63172
- maybeCount++;
63200
+ const maybeStart = maybeKeys.size;
63201
+ maybeKeys.push(id);
63173
63202
  const saveExpandingFlags = expandingFlags;
63174
63203
  if (recursionFlags & 1 /* Source */) {
63175
63204
  sourceStack[sourceDepth] = source2;
@@ -63221,15 +63250,21 @@ ${lanes.join("\n")}
63221
63250
  if (result2) {
63222
63251
  if (result2 === -1 /* True */ || sourceDepth === 0 && targetDepth === 0) {
63223
63252
  if (result2 === -1 /* True */ || result2 === 3 /* Maybe */) {
63224
- for (let i = maybeStart; i < maybeCount; i++) {
63225
- relation.set(maybeKeys[i], 1 /* Succeeded */ | propagatingVarianceFlags);
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();
63226
63260
  }
63227
63261
  }
63228
- maybeCount = maybeStart;
63229
63262
  }
63230
63263
  } else {
63231
63264
  relation.set(id, (reportErrors2 ? 4 /* Reported */ : 0) | 2 /* Failed */ | propagatingVarianceFlags);
63232
- maybeCount = maybeStart;
63265
+ while (maybeKeys.size > maybeStart) {
63266
+ maybeKeys.pop();
63267
+ }
63233
63268
  }
63234
63269
  return result2;
63235
63270
  }
@@ -91473,7 +91508,7 @@ ${lanes.join("\n")}
91473
91508
  const constantValue = tryGetConstEnumValue(node);
91474
91509
  if (constantValue !== void 0) {
91475
91510
  setConstantValue(node, constantValue);
91476
- const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : factory2.createNumericLiteral(constantValue);
91511
+ const substitute = typeof constantValue === "string" ? factory2.createStringLiteral(constantValue) : constantValue < 0 ? factory2.createPrefixUnaryExpression(41 /* MinusToken */, factory2.createNumericLiteral(Math.abs(constantValue))) : factory2.createNumericLiteral(constantValue);
91477
91512
  if (!compilerOptions.removeComments) {
91478
91513
  const originalNode = getOriginalNode(node, isAccessExpression);
91479
91514
  addSyntheticTrailingComment(substitute, 3 /* MultiLineCommentTrivia */, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `);
@@ -113856,7 +113891,7 @@ ${lanes.join("\n")}
113856
113891
  return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(25 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */));
113857
113892
  } else if (isAccessExpression(expression)) {
113858
113893
  const constantValue = getConstantValue(expression);
113859
- return typeof constantValue === "number" && isFinite(constantValue) && Math.floor(constantValue) === constantValue;
113894
+ return typeof constantValue === "number" && isFinite(constantValue) && constantValue >= 0 && Math.floor(constantValue) === constantValue;
113860
113895
  }
113861
113896
  }
113862
113897
  function emitElementAccessExpression(node) {
@@ -172134,6 +172169,7 @@ ${options.prefix}` : "\n" : options.prefix
172134
172169
  createSourceFile: () => createSourceFile,
172135
172170
  createSourceMapGenerator: () => createSourceMapGenerator,
172136
172171
  createSourceMapSource: () => createSourceMapSource,
172172
+ createStackSet: () => createStackSet,
172137
172173
  createSuperAccessVariableStatement: () => createSuperAccessVariableStatement,
172138
172174
  createSymbolTable: () => createSymbolTable,
172139
172175
  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.20230731`;
57
+ var version = `${versionMajorMinor}.0-insiders.20230801`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
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-55214-6",
5
+ "version": "5.2.0-pr-55224-9",
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": "7b3d3f7bf8a0cd125b81d1ca3c3e0bedcba6a8f6"
117
+ "gitHead": "555315567c5e1c558a465e4b028863ac2d90a7e5"
118
118
  }